Class DefaultASTPrinter
java.lang.Object
com.oracle.truffle.api.instrument.impl.DefaultASTPrinter
- All Implemented Interfaces:
ASTPrinter
A language-agnostic for printing out various pieces of a Truffle AST.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static Stringprotected static Stringprotected voidprintChild(PrintWriter p, int maxDepth, Node markNode, int level, NodeUtil.NodeField field, Object value) protected voidprintChildren(PrintWriter p, int maxDepth, Node markNode, int level, NodeUtil.NodeField field, Object value) protected static voidprintNewLine(PrintWriter p, int level) protected static voidprintNewLine(PrintWriter p, int level, boolean mark) voidprintTree(PrintWriter p, Node node, int maxDepth, Node markNode) Prints a textual AST display, one line per node, with nesting.protected voidprintTree(PrintWriter p, Node node, int maxDepth, Node markNode, int level) printTreeToString(Node node, int maxDepth) Creates a textual AST display, one line per node, with nesting.printTreeToString(Node node, int maxDepth, Node markNode) Creates a textual AST display, one line per node, with nesting.protected static StringsourceInfo(Node node)
-
Constructor Details
-
DefaultASTPrinter
public DefaultASTPrinter()
-
-
Method Details
-
printTree
Description copied from interface:ASTPrinterPrints a textual AST display, one line per node, with nesting.- Specified by:
printTreein interfaceASTPrinternode- the root node of the display.maxDepth- the maximum number of levels to print below the rootmarkNode- a node to mark with a textual arrow prefix, if present.
-
printTreeToString
Description copied from interface:ASTPrinterCreates a textual AST display, one line per node, with nesting.- Specified by:
printTreeToStringin interfaceASTPrinter- Parameters:
node- the root node of the display.maxDepth- the maximum number of levels to print below the rootmarkNode- a node to mark with a textual arrow prefix, if present.
-
printTreeToString
Description copied from interface:ASTPrinterCreates a textual AST display, one line per node, with nesting.- Specified by:
printTreeToStringin interfaceASTPrinter- Parameters:
node- the root node of the display.maxDepth- the maximum number of levels to print below the root
-
printTree
-
printChildren
protected void printChildren(PrintWriter p, int maxDepth, Node markNode, int level, NodeUtil.NodeField field, Object value) -
printChild
protected void printChild(PrintWriter p, int maxDepth, Node markNode, int level, NodeUtil.NodeField field, Object value) -
printNewLine
-
printNewLine
-
nodeName
-
sourceInfo
-
instrumentInfo
-