close
This commit is contained in:
parent
fa3970aa0e
commit
1567b1b863
1 changed files with 17 additions and 6 deletions
|
@ -169,6 +169,11 @@ function parse(string) {
|
||||||
} else {
|
} else {
|
||||||
doc_reset()
|
doc_reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (match(string, RE_CLOSE)) {
|
||||||
|
current_match = "close"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -179,6 +184,7 @@ function parse(string) {
|
||||||
# doc
|
# doc
|
||||||
if (action == "doc") {
|
if (action == "doc") {
|
||||||
parse($0)
|
parse($0)
|
||||||
|
|
||||||
# doc
|
# doc
|
||||||
if (match($0, RE_DOC)) {
|
if (match($0, RE_DOC)) {
|
||||||
if (current_function) {
|
if (current_function) {
|
||||||
|
@ -186,6 +192,7 @@ if (action == "doc") {
|
||||||
} else {
|
} else {
|
||||||
doc_append(extract($0, "doc"))
|
doc_append(extract($0, "doc"))
|
||||||
}
|
}
|
||||||
|
|
||||||
# constant
|
# constant
|
||||||
} else if (current_match == "constant") {
|
} else if (current_match == "constant") {
|
||||||
if (constant == target) {
|
if (constant == target) {
|
||||||
|
@ -194,6 +201,7 @@ if (action == "doc") {
|
||||||
doc_reset()
|
doc_reset()
|
||||||
constant = ""
|
constant = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
# variable
|
# variable
|
||||||
} else if (current_match == "variable") {
|
} else if (current_match == "variable") {
|
||||||
if (variable == target) {
|
if (variable == target) {
|
||||||
|
@ -202,16 +210,19 @@ if (action == "doc") {
|
||||||
doc_reset()
|
doc_reset()
|
||||||
variable = ""
|
variable = ""
|
||||||
}
|
}
|
||||||
# others
|
|
||||||
} else if (match($0, RE_CLOSE)) {
|
}
|
||||||
if (match_alias) {
|
|
||||||
|
# function
|
||||||
|
if (current_match == "close") {
|
||||||
|
if (target == current_function) {
|
||||||
|
doc_output(current_function, "function")
|
||||||
|
} else if (target in aliases) {
|
||||||
print "= " target
|
print "= " target
|
||||||
doc_output(current_function, "function")
|
doc_output(current_function, "function")
|
||||||
} else if (match_command) {
|
} else if (target in commands) {
|
||||||
print "/ " target
|
print "/ " target
|
||||||
doc_output(current_function, "function")
|
doc_output(current_function, "function")
|
||||||
} else if (current_function == target) {
|
|
||||||
doc_output(current_function, "function")
|
|
||||||
} else {
|
} else {
|
||||||
current_function = ""
|
current_function = ""
|
||||||
doc_reset()
|
doc_reset()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue