Class AstNode.DebugPrintVisitor
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ast.AstNode.DebugPrintVisitor
-
- All Implemented Interfaces:
NodeVisitor
- Enclosing class:
- AstNode
protected static class AstNode.DebugPrintVisitor extends java.lang.Object implements NodeVisitor
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuilder
buffer
private static int
DEBUG_INDENT
-
Constructor Summary
Constructors Constructor Description DebugPrintVisitor(java.lang.StringBuilder buf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
makeIndent(int depth)
java.lang.String
toString()
boolean
visit(AstNode node)
Visits an AST node.
-
-
-
Field Detail
-
buffer
private java.lang.StringBuilder buffer
-
DEBUG_INDENT
private static final int DEBUG_INDENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
makeIndent
private static java.lang.String makeIndent(int depth)
-
visit
public boolean visit(AstNode node)
Description copied from interface:NodeVisitor
Visits an AST node.- Specified by:
visit
in interfaceNodeVisitor
- Parameters:
node
- the AST node. Will never visit anAstRoot
node, since theAstRoot
is where the visiting begins.- Returns:
true
if the children should be visited. Iffalse
, the subtree rooted at this node is skipped. Thenode
argument should never benull
-- the individualAstNode
classes should skip any children that are not present in the source when they invoke this method.
-
-