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

    Modifier and Type
    Method
    Description
    void
    printTree(PrintWriter p, Node node, int maxDepth, Node markNode)
    Prints a textual AST display, one line per node, with nesting.
    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.
  • Method Details

    • printTree

      void printTree(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 root
      markNode - a node to mark with a textual arrow prefix, if present.
    • printTreeToString

      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 root
      markNode - a node to mark with a textual arrow prefix, if present.
    • printTreeToString

      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