27 from omniidl_be.python
import comment, output_inline
28 from omniidl_be.python
import run
as run_parent
29 from omniidl
import idlvisitor, idlast, idltype
33 li = s.rsplit(old, occurrence)
50 for c
in reversed(comments):
51 if line - c.line() != 1:
58 if isinstance(node, idlast.Attribute):
59 for i
in node.identifiers():
60 print(i +
" documentation may be ill-formed.")
62 print(node.identifier() +
" documentation may be ill-formed.")
66 if isinstance(node, idlast.Operation):
67 with open(node.file())
as fp:
68 for _
in range(node.line() - 1):
71 texts.append(
"\nPrototype:\t" + line)
76 texts.append(
" \t" + line)
82 id = node.identifier() +
"__doc__"
90 node.scopedName()[:-1]
94 _rreplace(node.repoId(), node.identifier(), id, 1),
107 if isinstance(parent, idlast.Module):
108 parent._Module__definitions.append(const)
109 elif isinstance(parent, idlast.Interface):
110 parent._Interface__declarations.append(const)
111 parent._Interface__contents.append(const)
112 elif isinstance(parent, idlast.AST):
113 parent._AST__declarations.append(const)
115 print(
"Doc ignored: " + comment.text())
118 for n
in node.declarations():
119 if not output_inline
and not n.mainFile():
122 if isinstance(n, idlast.Module)
or isinstance(n, idlast.Interface):
127 for n
in node.definitions():
128 if not output_inline
and not n.mainFile():
131 if isinstance(n, idlast.Module)
or isinstance(n, idlast.Interface):
136 for c
in node.callables():
144 run_parent(tree, args)