match/command

This commit is contained in:
Marc Beninca 2025-07-08 21:23:49 +02:00
parent ab53ee87e1
commit 359726e070
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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) {