better doxygen support

This commit is contained in:
Marc Wäckerlin
2015-05-06 23:09:49 +00:00
parent 2a8c072769
commit bf6b4764db
6 changed files with 122 additions and 74 deletions

View File

@@ -17,18 +17,28 @@
# variable definition
/^set/{
s,^set \+\([^ =]\+\)\( *= *\(.*\)\)\?,/** @var \1, # prepend variable decl
G # append hold buffer
s,$, */\n, # append end of comment
p; z; x; d # clear buffer, next line
x
s,$, */, # append end of comment
x
s,^set \+\([^ =]\+\) *\=\? *\(.*\)\?,void \1;\n,
H
s,^void ,/** @var , # prepend function decl
s,;$,,
G # append hold buffer
p; z; x; d # clear buffer, next line
}
# function definition
/^function/{
s,^function \+\([^ ]\+\) *\(.*\)\?,/** @fn \1(\2), # prepend function decl
G # append hold buffer
s,$, */\n, # append end of comment
p; z; x; d # clear buffer, next line
x
s,$, */, # append end of comment
x
s,^function \+\([^ ]\+\) *\(.*\)\?,void \1(\2);\n,
H
s,^void ,/** @def , # prepend function decl
s,;$,,
G # append hold buffer
p; z; x; d # clear buffer, next line
}
# default for non matching lines - print buffer

View File

@@ -1,13 +0,0 @@
## Commented Webtest Example File
##
## This is text that can be converted to doxygen using the tool
## @c doxygen-webtester.sed as filter.
## This is a variable declaration
set a=b
## This is a function
##
## Here we have an example of a function declaration
function function-name ARG1, ARG2
# do nothing

View File

@@ -7,3 +7,6 @@
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
dist_bin_SCRIPTS = doxygen-webtester.sed
MAINTAINERCLEANFILES = makefile.in