Interface ASTPrinter
-
- All Known Implementing Classes:
DefaultASTPrinter
public interface ASTPrinter
Access to AST-based debugging support, which is could be language implementation specific in the details chosen to be presented.WARNING: this interface is under development and will change substantially.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
printTree(java.io.PrintWriter p, Node node, int maxDepth, Node markNode)
Prints a textual AST display, one line per node, with nesting.java.lang.String
printTreeToString(Node node, int maxDepth)
Creates a textual AST display, one line per node, with nesting.java.lang.String
printTreeToString(Node node, int maxDepth, Node markNode)
Creates a textual AST display, one line per node, with nesting.
-
-
-
Method Detail
-
printTree
void printTree(java.io.PrintWriter p, Node node, int maxDepth, Node markNode)
Prints a textual AST display, one line per node, with nesting.- Parameters:
p
-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
java.lang.String printTreeToString(Node node, int maxDepth, Node markNode)
Creates a textual AST display, one line per node, with nesting.- 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
java.lang.String printTreeToString(Node node, int maxDepth)
Creates a textual AST display, one line per node, with nesting.- Parameters:
node
- the root node of the display.maxDepth
- the maximum number of levels to print below the root
-
-