properly handle doccomments for ignored elements
MODIFY
hdr_parser.py
hdr_parser.py
@@ -922,6 +922,7 @@ class CppHeaderParser(object):
if token == "//!":
block_head += " " + l[:pos]
+ if self.block_stack[-1][self.PROCESS_FLAG]:
docstring += l[pos+3:].lstrip() + "\n"
break
@@ -1002,8 +1003,6 @@ class CppHeaderParser(object):
_, _, _, umat_decl = self.parse_stmt(stmt, token, mat="UMat", docstring=docstring)
decls.append(umat_decl)
docstring = ""
- elif parse_flag:
- docstring = ""
if stmt_type == "namespace":
chunks = [block[1] for block in self.block_stack if block[0] == 'namespace'] + [name]
self.namespaces.add('.'.join(chunks))

properly handle doccomments for ignored elements