filter/constants
This commit is contained in:
parent
c9c35169be
commit
b9c14b7dd8
2 changed files with 3 additions and 7 deletions
|
@ -41,7 +41,7 @@ BEGIN {
|
|||
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["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
|
||||
RE_MODULE = RE_BEGIN "#\\." RE_SPACES RE_ANY RE_END
|
||||
|
@ -70,10 +70,6 @@ BEGIN {
|
|||
if (match($0, RE_COMMAND, m)) {
|
||||
print m[1]
|
||||
}
|
||||
} else if (action == "constants") {
|
||||
if (match($0, RE_CONSTANT, m)) {
|
||||
print m[1]
|
||||
}
|
||||
} else if (action == "tasks") {
|
||||
if (match($0, RE_MODULE, m)) {
|
||||
if (output_tasks) {
|
||||
|
@ -161,7 +157,7 @@ BEGIN {
|
|||
match_command = 1
|
||||
}
|
||||
# set
|
||||
} else if (match($0, RE_CONSTANT, m)) {
|
||||
} else if (match($0, re["constant"], m)) {
|
||||
if (m[1] == target) {
|
||||
output(m[1], "constant")
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue