[asmxygen] Document label function parameters according to @param directives

git-svn-id: svn://kolibrios.org@9028 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2021-07-08 16:56:05 +00:00
parent 0f1e2f75dc
commit 923adaf09c

View File

@ -1454,6 +1454,24 @@ class AsmFunction(AsmElement):
doxycomment += self.comment doxycomment += self.comment
if '@brief' not in doxycomment: if '@brief' not in doxycomment:
doxycomment = '@brief ' + doxycomment doxycomment = '@brief ' + doxycomment
# If there was no arguments, maybe that's just a label
# then parse parameters from its comment
if len(self.args) == 0 and '@param' in self.comment:
i = 0
while '@param' in self.comment[i:]:
i = self.comment.index('@param', i)
# Skip '@param'
i += len('@param')
# Skip spaces after '@param'
while self.comment[i].isspace():
i += 1
# Get the parameter name
name = ''
while is_id(self.comment[i]):
name += self.comment[i]
i += 1
# Save the parameter
self.args.append((name, 'arg_t'))
# Build the arg list for declaration # Build the arg list for declaration
arg_list = '(' arg_list = '('
if len(self.args) > 0: if len(self.args) > 0: