class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "assertOnChange"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
boolean_type "boolean"
variable_declarator
identifier "CONVERT_WHILE_TO_FOR"
= "="
true "true"
; ";"
field_declaration
modifiers
static "static"
final "final"
boolean_type "boolean"
variable_declarator
identifier "MAKE_LOCAL_NAMES_UNIQUE"
= "="
true "true"
; ";"
field_declaration (+32 nodes collapsed)
constructor_declaration (+35 nodes collapsed)
method_declaration (+99 nodes collapsed)
method_declaration (+84 nodes collapsed)
method_declaration (+49 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "process"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "externs"
, ","
formal_parameter
type_identifier "Node"
identifier "root"
) ")"
block
{ "{"
expression_statement
method_invocation
object_creation_expression
new "new"
type_identifier "NodeTraversal"
argument_list
( "("
identifier "compiler"
, ","
object_creation_expression
new "new"
type_identifier "NormalizeStatements"
argument_list
( "("
identifier "compiler"
, ","
identifier "assertOnChange"
) ")"
) ")"
. "."
identifier "traverse"
argument_list
( "("
identifier "root"
) ")"
; ";"
if_statement (+48 nodes collapsed)
line_comment "// It is important that removeDuplicateDeclarations runs aft"...
line_comment "// MakeDeclaredNamesUnique in order for catch block exceptio"...
line_comment "// handled properly. Specifically, catch block exception nam"...
line_comment "// only valid within the catch block, but our currect Scope "...
line_comment "// has no concept of this and includes it in the containing "...
line_comment "// (or global scope). MakeDeclaredNamesUnique makes the catc"...
line_comment "// names unique so that removeDuplicateDeclarations() will p"...
line_comment "// cases where a function scope variable conflict with a exc"...
line_comment "// function f() {"
line_comment "// try {throw 0;} catch(e) {e; /* catch scope 'e'*/}"
line_comment "// var e = 1; // f scope 'e'"
line_comment "// }"
line_comment "// otherwise 'var e = 1' would be rewritten as 'e = 1'."
line_comment "// TODO(johnlenz): Introduce a seperate scope for catch node"...
expression_statement
method_invocation
identifier "removeDuplicateDeclarations"
argument_list
( "("
identifier "externs"
, ","
identifier "root"
) ")"
; ";"
expression_statement
method_invocation
object_creation_expression
new "new"
type_identifier "PropagateConstantAnnotationsOverVars"
argument_list
( "("
identifier "compiler"
, ","
identifier "assertOnChange"
) ")"
. "."
identifier "process"
argument_list
( "("
identifier "externs"
, ","
identifier "root"
) ")"
; ";"
if_statement (+36 nodes collapsed)
} "}"
block_comment "/**\n * Propagate constant annotations over the Var graph.\n"...
class_declaration (+394 nodes collapsed)
block_comment "/**\n * Walk the AST tree and verify that constant names ar"...
class_declaration (+590 nodes collapsed)
block_comment "/**\n * Simplify the AST:\n * - VAR declarations split, "...
class_declaration (+2176 nodes collapsed)
block_comment "/**\n * Remove duplicate VAR declarations.\n */"
method_declaration (+79 nodes collapsed)
block_comment "/**\n * ScopeCreator duplicate declaration handler.\n */"
class_declaration (+711 nodes collapsed)
block_comment "/**\n * A simple class that causes scope to be created.\n "...
class_declaration (+117 nodes collapsed)
} "}"