Compare commits
No commits in common. "d0596131ca890bc76e8327cc2937ff251ab6c963" and "aeff5a62f2fa70d939530e6bf44b9b9ace344287" have entirely different histories.
d0596131ca
...
aeff5a62f2
1 changed files with 5 additions and 12 deletions
15
sh/main.awk
15
sh/main.awk
|
@ -6,16 +6,13 @@ function append(line) {
|
|||
}
|
||||
|
||||
function output(name, type) {
|
||||
print "↙ " type
|
||||
print name
|
||||
print name " ← " type
|
||||
print doc
|
||||
exit
|
||||
}
|
||||
|
||||
function reset() {
|
||||
if (f == "") {
|
||||
doc = ""
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
|
@ -40,7 +37,6 @@ BEGIN {
|
|||
RE_VARIABLE = RE_BEGIN RE_VAR RE_SET RE_END
|
||||
|
||||
alias = 0
|
||||
f = ""
|
||||
reset()
|
||||
module = 0
|
||||
}
|
||||
|
@ -89,15 +85,12 @@ BEGIN {
|
|||
module = 1
|
||||
}
|
||||
} else if (match($0, RE_FUNCTION, m)) {
|
||||
f = m[1]
|
||||
} else if (match($0, RE_CLOSE, m)) {
|
||||
if (alias) {
|
||||
print "= " target
|
||||
output(f, "function")
|
||||
} else if (f == target) {
|
||||
output(f, "function")
|
||||
output(m[1], "function")
|
||||
} else if (m[1] == target) {
|
||||
output(target, "function")
|
||||
} else {
|
||||
f = ""
|
||||
reset()
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue