class_body
{ "{"
line_comment "// Constants for symbol types, for easier readability."
field_declaration
modifiers
private "private"
final "final"
type_identifier "SymbolType"
variable_declarator
identifier "PROPERTY"
= "="
field_access
identifier "SymbolType"
. "."
identifier "PROPERTY"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "SymbolType"
variable_declarator
identifier "VAR"
= "="
field_access
identifier "SymbolType"
. "."
identifier "VAR"
; ";"
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 "canModifyExterns"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "anchorUnusedVars"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSModuleGraph"
variable_declarator
identifier "moduleGraph"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSModule"
variable_declarator
identifier "firstModule"
; ";"
line_comment "// Properties that are implicitly used as part of the JS lan"...
field_declaration (+36 nodes collapsed)
line_comment "// A graph where the nodes are property names or variable na"...
line_comment "// and the edges signify the modules where the property is r"...
line_comment "// For example, if we had the code:"
line_comment "//"
line_comment "// Foo.prototype.bar = function(x) { x.baz(); }; // in modul"...
line_comment "//"
line_comment "// then this would be represented in the graph by a node rep"...
line_comment "// \"bar\", a node representing \"baz\", and an edge between the"...
line_comment "// module #2."
line_comment "//"
line_comment "// Similarly, if we had:"
line_comment "//"
line_comment "// var scotch = function(f) { return f.age(); };"
line_comment "//"
line_comment "// then there would be a node for \"scotch\", a node for \"age\""...
line_comment "// from scotch to age."
field_declaration (+23 nodes collapsed)
line_comment "// A dummy node for representing global references."
field_declaration
modifiers
private "private"
final "final"
type_identifier "NameInfo"
variable_declarator
identifier "globalNode"
= "="
object_creation_expression
new "new"
type_identifier "NameInfo"
argument_list
( "("
string_literal
" "\""
string_fragment "[global]"
" "\""
) ")"
; ";"
line_comment "// A dummy node for representing extern references."
field_declaration
modifiers
private "private"
final "final"
type_identifier "NameInfo"
variable_declarator
identifier "externNode"
= "="
object_creation_expression
new "new"
type_identifier "NameInfo"
argument_list
( "("
string_literal
" "\""
string_fragment "[extern]"
" "\""
) ")"
; ";"
line_comment "// A dummy node for representing all anonymous functions wit"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "NameInfo"
variable_declarator
identifier "anonymousNode"
= "="
object_creation_expression
new "new"
type_identifier "NameInfo"
argument_list
( "("
string_literal
" "\""
string_fragment "[anonymous]"
" "\""
) ")"
; ";"
line_comment "// All the real NameInfo for prototype properties, hashed by"...
line_comment "// of the property that they represent."
field_declaration (+23 nodes collapsed)
line_comment "// All the NameInfo for global functions, hashed by the name"...
line_comment "// gloval variable that it's assigned to."
field_declaration (+23 nodes collapsed)
block_comment "/**\n * Creates a new pass for analyzing prototype properti"...
constructor_declaration (+219 nodes collapsed)
method_declaration (+114 nodes collapsed)
block_comment "/**\n * Returns information on all prototype properties.\n "...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * Gets the name info for the property or variable of "...
method_declaration (+110 nodes collapsed)
class_declaration
modifiers
private "private"
class "class"
identifier "ProcessProperties"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
type_identifier "NodeTraversal"
. "."
type_identifier "ScopedCallback"
class_body
{ "{"
field_declaration (+24 nodes collapsed)
constructor_declaration (+26 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "exitScope"
formal_parameters
( "("
formal_parameter
type_identifier "NodeTraversal"
identifier "t"
) ")"
block
{ "{"
} "}"
method_declaration (+198 nodes collapsed)
method_declaration (+694 nodes collapsed)
method_declaration (+139 nodes collapsed)
block_comment "/**\n * Determines whether {@code n} is the FUNCTION node"...
method_declaration (+77 nodes collapsed)
method_declaration
modifiers
private "private"
boolean_type "boolean"
identifier "isPrototypePropertyAssign"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "assign"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "n"
= "="
method_invocation
identifier "assign"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression any 3:3
binary_expression any 3:3
binary_expression any 3:3
identifier "n"
!= "!="
null_literal "null"
&& "&&"
method_invocation
identifier "NodeUtil"
. "."
identifier "isVarOrSimpleAssignLhs"
argument_list
( "("
identifier "n"
, ","
identifier "assign"
) ")"
&& "&&"
binary_expression
method_invocation
identifier "n"
. "."
identifier "getType"
argument_list
( "("
) ")"
== "=="
field_access
identifier "Token"
. "."
identifier "GETPROP"
) ")"
block (+107 nodes collapsed)
return_statement
return "return"
false "false"
; ";"
} "}"
block_comment "/**\n * Processes a NAME node to see if it's a global fun"...
method_declaration (+180 nodes collapsed)
block_comment "/**\n * Processes the parent of a GETPROP prototype, whic"...
method_declaration (+347 nodes collapsed)
method_declaration (+43 nodes collapsed)
} "}"
class_declaration (+87 nodes collapsed)
class_declaration (+123 nodes collapsed)
line_comment "// TODO(user): We can use DefinitionsRemover and UseSite her"...
line_comment "// we need to do is call getDefinition() and we'll magically"...
line_comment "// about the definition."
block_comment "/**\n * The declaration of an abstract symbol.\n */"
interface_declaration (+22 nodes collapsed)
enum_declaration
modifiers
private "private"
enum "enum"
identifier "SymbolType"
enum_body
{ "{"
enum_constant
identifier "PROPERTY"
, ","
enum_constant
identifier "VAR"
enum_body_declarations
; ";"
} "}"
block_comment "/**\n * A function initialized as a VAR statement or a func"...
class_declaration (+288 nodes collapsed)
block_comment "/**\n * Since there are two ways of assigning properties to"...
interface_declaration (+26 nodes collapsed)
block_comment "/**\n * Properties created via EXPR assignment:\n *\n * <"...
class_declaration (+195 nodes collapsed)
block_comment "/**\n * Properties created via object literals:\n *\n * <"...
class_declaration (+208 nodes collapsed)
block_comment "/**\n * The context of the current name. This includes the "...
class_declaration (+40 nodes collapsed)
block_comment "/**\n * Information on all properties or global variables o"...
class_declaration (+288 nodes collapsed)
} "}"