next
This commit is contained in:
parent
1b1a420156
commit
99ab0bddd4
1 changed files with 44 additions and 49 deletions
|
@ -242,42 +242,6 @@ function parse(string) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_next(string) {
|
|
||||||
|
|
||||||
# constant
|
|
||||||
if (current_match == "constant") {
|
|
||||||
doc_reset()
|
|
||||||
constant = ""
|
|
||||||
|
|
||||||
# variable
|
|
||||||
} else if (current_match == "variable") {
|
|
||||||
doc_reset()
|
|
||||||
variable = ""
|
|
||||||
|
|
||||||
# alias
|
|
||||||
} else if (current_match == "alias") {
|
|
||||||
alias = ""
|
|
||||||
|
|
||||||
# command
|
|
||||||
} else if (current_match == "command") {
|
|
||||||
command = ""
|
|
||||||
|
|
||||||
# task
|
|
||||||
} else if (current_match == "task") {
|
|
||||||
task = ""
|
|
||||||
|
|
||||||
# close
|
|
||||||
} else if (current_match == "close") {
|
|
||||||
doc_reset()
|
|
||||||
current_function = ""
|
|
||||||
|
|
||||||
# match
|
|
||||||
}
|
|
||||||
|
|
||||||
# next
|
|
||||||
line++
|
|
||||||
}
|
|
||||||
|
|
||||||
# ╭──────┬──────╮
|
# ╭──────┬──────╮
|
||||||
# │ code │ main │
|
# │ code │ main │
|
||||||
# ╰──────┴──────╯
|
# ╰──────┴──────╯
|
||||||
|
@ -288,7 +252,7 @@ function parse_next(string) {
|
||||||
# │ code │ main │ parse │
|
# │ code │ main │ parse │
|
||||||
# ╰──────┴──────┴───────╯
|
# ╰──────┴──────┴───────╯
|
||||||
|
|
||||||
parse($0)
|
# TODO parse($0)
|
||||||
|
|
||||||
# ╭──────┬──────┬──────╮
|
# ╭──────┬──────┬──────╮
|
||||||
# │ code │ main │ exit │
|
# │ code │ main │ exit │
|
||||||
|
@ -427,7 +391,38 @@ if (action == "doc") {
|
||||||
# │ code │ main │ next │
|
# │ code │ main │ next │
|
||||||
# ╰──────┴──────┴──────╯
|
# ╰──────┴──────┴──────╯
|
||||||
|
|
||||||
parse_next($0)
|
# constant
|
||||||
|
if (current_match == "constant") {
|
||||||
|
doc_reset()
|
||||||
|
constant = ""
|
||||||
|
|
||||||
|
# variable
|
||||||
|
} else if (current_match == "variable") {
|
||||||
|
doc_reset()
|
||||||
|
variable = ""
|
||||||
|
|
||||||
|
# alias
|
||||||
|
} else if (current_match == "alias") {
|
||||||
|
alias = ""
|
||||||
|
|
||||||
|
# command
|
||||||
|
} else if (current_match == "command") {
|
||||||
|
command = ""
|
||||||
|
|
||||||
|
# task
|
||||||
|
} else if (current_match == "task") {
|
||||||
|
task = ""
|
||||||
|
|
||||||
|
# close
|
||||||
|
} else if (current_match == "close") {
|
||||||
|
doc_reset()
|
||||||
|
current_function = ""
|
||||||
|
|
||||||
|
# match
|
||||||
|
}
|
||||||
|
|
||||||
|
# next
|
||||||
|
line++
|
||||||
|
|
||||||
# main
|
# main
|
||||||
}
|
}
|
||||||
|
@ -438,18 +433,18 @@ parse_next($0)
|
||||||
|
|
||||||
END {
|
END {
|
||||||
|
|
||||||
# filter
|
# filter
|
||||||
if (action == "filter") {
|
if (action == "filter") {
|
||||||
for (item in unique) {
|
for (item in unique) {
|
||||||
print item
|
print item
|
||||||
|
}
|
||||||
|
|
||||||
|
# lint
|
||||||
|
} else if (action == "lint") {
|
||||||
|
print lint
|
||||||
|
|
||||||
|
# action
|
||||||
}
|
}
|
||||||
|
|
||||||
# lint
|
|
||||||
} else if (action == "lint") {
|
|
||||||
print lint
|
|
||||||
|
|
||||||
# action
|
|
||||||
}
|
|
||||||
|
|
||||||
# end
|
# end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue