Source code for ctree.cpp.dotgen
"""
DOT generation for C preprocessor directives.
"""
from ctree.dotgen import DotGenLabeller
[docs]class CppDotLabeller(DotGenLabeller):
"""
Visitor to generator DOT.
"""
[docs] def visit_CppInclude(self, node):
if node.angled_brackets:
return "target: <%s>" % node.target
else:
return 'target: "%s"' % node.target