strip_function
This commit is contained in:
parent
9bda167820
commit
0bf484f76c
1 changed files with 12 additions and 2 deletions
|
@ -64,6 +64,13 @@ function remove_first(string, target, tmp) {
|
||||||
return trim(tmp)
|
return trim(tmp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO parent function
|
||||||
|
|
||||||
|
function strip_function(string, tmp) {
|
||||||
|
split(string, tmp, "(")
|
||||||
|
return trim(tmp[1])
|
||||||
|
}
|
||||||
|
|
||||||
function strip_value(string, tmp) {
|
function strip_value(string, tmp) {
|
||||||
split(string, tmp, "=")
|
split(string, tmp, "=")
|
||||||
return trim(tmp[1])
|
return trim(tmp[1])
|
||||||
|
@ -150,6 +157,11 @@ function parse(string) {
|
||||||
commands[command] = ""
|
commands[command] = ""
|
||||||
doc_append("/ " command)
|
doc_append("/ " command)
|
||||||
|
|
||||||
|
# function
|
||||||
|
} else if (match(string, re["function"])) {
|
||||||
|
current_match = "function"
|
||||||
|
current_function = strip_function(string)
|
||||||
|
|
||||||
# other
|
# other
|
||||||
} else {
|
} else {
|
||||||
if (module == target) {
|
if (module == target) {
|
||||||
|
@ -191,8 +203,6 @@ if (action == "doc") {
|
||||||
variable = ""
|
variable = ""
|
||||||
}
|
}
|
||||||
# others
|
# others
|
||||||
} else if (match($0, re["function"])) {
|
|
||||||
f = extract($0, "function")
|
|
||||||
} else if (match($0, RE_CLOSE)) {
|
} else if (match($0, RE_CLOSE)) {
|
||||||
if (match_alias) {
|
if (match_alias) {
|
||||||
print "= " target
|
print "= " target
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue