class_body
{ "{"
field_declaration (+25 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration
modifiers
private "private"
type_identifier "CompilerInput"
variable_declarator
identifier "synthesizedExternsInput"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "synthesizedExternsRoot"
= "="
null_literal "null"
; ";"
line_comment "// Vars that still need to be declared in externs. These wil"...
line_comment "// at the end of the pass, or when we see the equivalent var"...
line_comment "// in the normal code."
field_declaration
modifiers
private "private"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "varsToDeclareInExterns"
= "="
method_invocation
identifier "Sets"
. "."
identifier "newHashSet"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
line_comment "// Whether this is the post-processing sanity check."
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "sanityCheck"
; ";"
line_comment "// Whether extern checks emit error."
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "strictExternCheck"
; ";"
constructor_declaration
identifier "VarCheck"
formal_parameters
( "("
formal_parameter
type_identifier "AbstractCompiler"
identifier "compiler"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
this "this"
argument_list
( "("
identifier "compiler"
, ","
false "false"
) ")"
; ";"
} "}"
constructor_declaration (+70 nodes collapsed)
method_declaration (+96 nodes collapsed)
method_declaration (+649 nodes collapsed)
block_comment "/**\n * Create a new variable in a synthetic script. This w"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "createSynthesizedExternVar"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "varName"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "nameNode"
= "="
method_invocation
identifier "Node"
. "."
identifier "newString"
argument_list
( "("
field_access
identifier "Token"
. "."
identifier "NAME"
, ","
identifier "varName"
) ")"
; ";"
line_comment "// Mark the variable as constant if it matches the coding co"...
line_comment "// for constant vars."
line_comment "// NOTE(nicksantos): honestly, i'm not sure how much this ma"...
line_comment "// AFAIK, all people who use the CONST coding convention als"...
line_comment "// compile with undeclaredVars as errors. We have some test"
line_comment "// cases for this configuration though, and it makes them ha"...
if_statement (+37 nodes collapsed)
expression_statement (+25 nodes collapsed)
expression_statement
method_invocation
identifier "varsToDeclareInExterns"
. "."
identifier "remove"
argument_list
( "("
identifier "varName"
) ")"
; ";"
} "}"
block_comment "/**\n * A check for name references in the externs inputs. "...
class_declaration (+301 nodes collapsed)
block_comment "/** Lazily create a \"new\" externs input for undeclared varia"...
method_declaration (+43 nodes collapsed)
block_comment "/** Lazily create a \"new\" externs root for undeclared variab"...
method_declaration (+51 nodes collapsed)
} "}"