Skip to content

Commit

Permalink
[IDL] Always add prototype to documentation. (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmirabel committed Mar 29, 2019
1 parent ed0257f commit 61e5574
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hpp/idl/omniidl_be_python_with_docstring.py
Expand Up @@ -51,7 +51,11 @@ def _commentToConst (self, node, comments):
text = c.text()
texts.append (re.sub(self.commentStart, "", text))
if len(texts)==0:
print (node.identifier() + " documentation may be ill-formed.")
if isinstance(node, idlast.Attribute):
for i in node.identifiers():
print (i + " documentation may be ill-formed.")
else:
print (node.identifier() + " documentation may be ill-formed.")
texts.reverse()
# Extract the prototype of the function
try:
Expand Down Expand Up @@ -80,7 +84,9 @@ def _commentToConst (self, node, comments):
text # value
)
def _addDoc (self, parent, node):
if len(node.comments()) > 0:
#Commented in order to add the prototype to the documentation.
#if len(node.comments()) > 0:
if True:
const = self._commentToConst (node, node.comments())
if const is None: return
if isinstance(parent, idlast.Module):
Expand Down

0 comments on commit 61e5574

Please sign in to comment.