Class AstElementNode
An AstNode
printed in the print-viewer.
This class can be overridden to define more specific behavior for some AstNode
s.
The getChildNode
and getStmtList
methods can be overridden to easily set up a child-parent relation between different AstElementNode
s.
Be very careful about overriding getChild
, as getChildNode
and getStmtList
depend on the default behavior of getChild
.
Import path
import semmle.python.PrintAst
Direct supertypes
Indirect supertypes
Known direct subtypes
Fields
Predicates
getAstNode | Gets the |
getChild | Gets the child node at index |
getChildNode | Gets a child node for the AstNode that this print node represents. |
getLocation | Gets the location of this node in the source code. |
getStmtList | Gets the |
toString | Gets a textual representation of this node in the PrintAst output tree. |
Inherited predicates
getAChild | Gets a child of this node. | from PrintAstNode |
getChildEdgeLabel | Gets the label for the edge from this node to the specified child. By default, this is just the index of the child, but subclasses can override this. | from PrintAstNode |
getParent | Gets the parent of this node, if any. | from PrintAstNode |
getProperty | Gets the value of the property of this node, where the name of the property is | from PrintAstNode |