This commit is contained in:
parent
c03f0792d8
commit
4dbc9d060a
1 changed files with 21 additions and 2 deletions
|
@ -40,6 +40,7 @@ BEGIN {
|
|||
RE_BINARY = RE_BEGIN "#\\|" RE_SPACES RE_VAR RE_END
|
||||
RE_CLOSE = RE_BEGIN "}" RE_SPACES RE_END
|
||||
RE_COMMAND = RE_BEGIN "#/" RE_SPACES RE_VAR RE_END
|
||||
RE_COMMENT = RE_BEGIN "#" RE_ANY RE_END
|
||||
RE_CONSTANT = RE_BEGIN RE_CONST RE_SET RE_END
|
||||
RE_DOC = RE_BEGIN RE_SPACES "#" RE_SPACE RE_ANY RE_END
|
||||
RE_FUNCTION = RE_BEGIN RE_VAR RE_FUNC RE_END
|
||||
|
@ -52,6 +53,7 @@ BEGIN {
|
|||
match_alias = 0
|
||||
match_command = 0
|
||||
match_module = 0
|
||||
match_task = 0
|
||||
reset()
|
||||
}
|
||||
|
||||
|
@ -78,9 +80,26 @@ BEGIN {
|
|||
}
|
||||
} else if (action == "tasks") {
|
||||
if (match($0, RE_MODULE, m)) {
|
||||
print ". " m[1]
|
||||
if (output_tasks) {
|
||||
print ""
|
||||
print output_module
|
||||
print output_tasks
|
||||
output_tasks = ""
|
||||
}
|
||||
doc = ""
|
||||
match_task = 0
|
||||
output_module = ". " m[1]
|
||||
} else if (match($0, RE_TASK, m)) {
|
||||
print $0
|
||||
match_task = 1
|
||||
append($0)
|
||||
} else if (match($0, RE_COMMENT, m)) {
|
||||
append($0)
|
||||
} else {
|
||||
if (match_task) {
|
||||
output_tasks = output_tasks "\n" doc
|
||||
}
|
||||
doc = ""
|
||||
match_task = 0
|
||||
}
|
||||
} else if (action == "variables") {
|
||||
if (match($0, RE_VARIABLE, m)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue