Commit 811dbde9 authored by da-woods's avatar da-woods Committed by Stefan Behnel

Improve node coverage in PrintTree (GH-3333)

Includes extra information for some additional types
parent 70bbd79f
......@@ -832,6 +832,10 @@ class PrintTree(TreeVisitor):
result += "(type=%s, name=\"%s\")" % (repr(node.type), node.name)
elif isinstance(node, Nodes.DefNode):
result += "(name=\"%s\")" % node.name
elif isinstance(node, ExprNodes.AttributeNode):
result += "(type=%s, attribute=\"%s\")" % (repr(node.type), node.attribute)
elif isinstance(node, ExprNodes.ConstNode):
result += "(type=%s, value=\"%s\")" % (repr(node.type), node.value)
elif isinstance(node, ExprNodes.ExprNode):
t = node.type
result += "(type=%s)" % repr(t)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment