match/command
This commit is contained in:
parent
ab53ee87e1
commit
359726e070
1 changed files with 4 additions and 4 deletions
|
@ -46,9 +46,9 @@ BEGIN {
|
||||||
RE_SHEBANG = RE_BEGIN "#!" RE_SPACES RE_ANY RE_END
|
RE_SHEBANG = RE_BEGIN "#!" RE_SPACES RE_ANY RE_END
|
||||||
RE_VARIABLE = RE_BEGIN RE_VAR RE_SET RE_END
|
RE_VARIABLE = RE_BEGIN RE_VAR RE_SET RE_END
|
||||||
|
|
||||||
match_alias = 0
|
|
||||||
command = 0
|
|
||||||
f = ""
|
f = ""
|
||||||
|
match_alias = 0
|
||||||
|
match_command = 0
|
||||||
reset()
|
reset()
|
||||||
module = 0
|
module = 0
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ BEGIN {
|
||||||
} else if (match($0, RE_COMMAND, m)) {
|
} else if (match($0, RE_COMMAND, m)) {
|
||||||
append("/ " m[1])
|
append("/ " m[1])
|
||||||
if (m[1] == target) {
|
if (m[1] == target) {
|
||||||
command = 1
|
match_command = 1
|
||||||
}
|
}
|
||||||
# set
|
# set
|
||||||
} else if (match($0, RE_CONSTANT, m)) {
|
} else if (match($0, RE_CONSTANT, m)) {
|
||||||
|
@ -162,7 +162,7 @@ BEGIN {
|
||||||
if (match_alias) {
|
if (match_alias) {
|
||||||
print "= " target
|
print "= " target
|
||||||
output(f, "function")
|
output(f, "function")
|
||||||
} else if (command) {
|
} else if (match_command) {
|
||||||
print "/ " target
|
print "/ " target
|
||||||
output(f, "function")
|
output(f, "function")
|
||||||
} else if (f == target) {
|
} else if (f == target) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue