public class PrettyPrinter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
appendSemicolon |
protected boolean |
printType |
Constructor and Description |
---|
PrettyPrinter()
Deprecated.
|
PrettyPrinter(Lang lang) |
Modifier and Type | Method and Description |
---|---|
boolean |
appendSemicolon()
Flag indicating whether to print a ';' after certain statements.
|
boolean |
appendSemicolon(boolean a)
Set a flag indicating whether to print a ';' after certain statements.
|
Lang |
lang() |
void |
print(Node parent,
Node child,
CodeWriter w)
Print an AST node using the given code writer.
|
void |
printAst(Node ast,
CodeWriter w)
Print an AST node using the given code writer.
|
boolean |
printType()
Flag indicating whether to print the type in a local declaration.
|
boolean |
printType(boolean a)
Set a flag indicating whether to print type type in a local declaration.
|
protected boolean appendSemicolon
protected boolean printType
@Deprecated public PrettyPrinter()
public PrettyPrinter(Lang lang)
public Lang lang()
public boolean appendSemicolon()
public boolean appendSemicolon(boolean a)
public boolean printType()
public boolean printType(boolean a)
public void print(Node parent, Node child, CodeWriter w)
CodeWriter.flush()
method must be called after this method
to ensure code is output. Use printAst
rather than this
method to print the entire AST; this method should only be called by
nodes to print their children.public void printAst(Node ast, CodeWriter w)