class PrepareAst extends java.lang.Object implements CompilerPass
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PrepareAst.PrepareAnnotations
Normalize where annotations appear on the AST.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
checkOnly |
private AbstractCompiler |
compiler |
Constructor and Description |
---|
PrepareAst(AbstractCompiler compiler) |
PrepareAst(AbstractCompiler compiler,
boolean checkOnly) |
Modifier and Type | Method and Description |
---|---|
private void |
normalizeBlocks(Node n)
Add blocks to IF, WHILE, DO, etc.
|
private void |
normalizeNodeTypes(Node n)
Covert EXPR_VOID to EXPR_RESULT to simplify the rest of the code.
|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
private void |
reportChange() |
private final AbstractCompiler compiler
private final boolean checkOnly
PrepareAst(AbstractCompiler compiler)
PrepareAst(AbstractCompiler compiler, boolean checkOnly)
private void reportChange()
public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treeprivate void normalizeNodeTypes(Node n)
private void normalizeBlocks(Node n)