This commit is contained in:
Marc Beninca 2025-08-03 21:14:58 +02:00
parent 1b1a420156
commit 99ab0bddd4
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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 │
# ╰──────┴──────╯
@ -288,7 +252,7 @@ function parse_next(string) {
# │ code │ main │ parse │
# ╰──────┴──────┴───────╯
parse($0)
# TODO parse($0)
# ╭──────┬──────┬──────╮
# │ code │ main │ exit │
@ -427,7 +391,38 @@ if (action == "doc") {
# │ 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
}
@ -438,18 +433,18 @@ parse_next($0)
END {
# filter
if (action == "filter") {
# filter
if (action == "filter") {
for (item in unique) {
print item
}
# lint
} else if (action == "lint") {
# lint
} else if (action == "lint") {
print lint
# action
}
# action
}
# end
}