match/alias
This commit is contained in:
parent
94eb3d2585
commit
ab53ee87e1
1 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ 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
|
||||||
|
|
||||||
alias = 0
|
match_alias = 0
|
||||||
command = 0
|
command = 0
|
||||||
f = ""
|
f = ""
|
||||||
reset()
|
reset()
|
||||||
|
@ -130,7 +130,7 @@ BEGIN {
|
||||||
} else if (match($0, RE_ALIAS, m)) {
|
} else if (match($0, RE_ALIAS, m)) {
|
||||||
append("= " m[1])
|
append("= " m[1])
|
||||||
if (m[1] == target) {
|
if (m[1] == target) {
|
||||||
alias = 1
|
match_alias = 1
|
||||||
}
|
}
|
||||||
} else if (match($0, RE_COMMAND, m)) {
|
} else if (match($0, RE_COMMAND, m)) {
|
||||||
append("/ " m[1])
|
append("/ " m[1])
|
||||||
|
@ -159,7 +159,7 @@ BEGIN {
|
||||||
} else if (match($0, RE_FUNCTION, m)) {
|
} else if (match($0, RE_FUNCTION, m)) {
|
||||||
f = m[1]
|
f = m[1]
|
||||||
} else if (match($0, RE_CLOSE, m)) {
|
} else if (match($0, RE_CLOSE, m)) {
|
||||||
if (alias) {
|
if (match_alias) {
|
||||||
print "= " target
|
print "= " target
|
||||||
output(f, "function")
|
output(f, "function")
|
||||||
} else if (command) {
|
} else if (command) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue