Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–1738 unchanged (1738 lines)
1739 Node jsDocParameters = functionType.getParametersNode();
1740 if (jsDocParameters != null) {
1741 Node jsDocParameter = jsDocParameters.getFirstChild();
1742 for (Node astParameter : astParameters.children()) {
1743 if (jsDocParameter != null) {
1744 defineSlot(astParameter, functionNode,
1745 jsDocParameter.getJSType(), true);
1746 jsDocParameter = jsDocParameter.getNext();
1747 } else {
1748 defineSlot(astParameter, functionNode, null, true);
1749 }
1750 }
1751 }
…lines 1752–1812 unchanged (61 lines)

After

…lines 1–1738 unchanged (1738 lines)
1739 Node jsDocParameters = functionType.getParametersNode();
1740 if (jsDocParameters != null) {
1741 Node jsDocParameter = jsDocParameters.getFirstChild();
1742 for (Node astParameter : astParameters.children()) {
1743 if (jsDocParameter != null) {
1744 defineSlot(astParameter, functionNode,
1745 jsDocParameter.getJSType(), false);
1746 jsDocParameter = jsDocParameter.getNext();
1747 } else {
1748 defineSlot(astParameter, functionNode, null, true);
1749 }
1750 }
1751 }
…lines 1752–1812 unchanged (61 lines)

Before

program
block_comment "/*\n * Copyright 2004 The Closure Compiler Authors.\n *\n * Lic"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "TypeCheck"
. "."
identifier "ENUM_DUP"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "TypeCheck"
. "."
identifier "ENUM_NOT_CONSTANT"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "TypeCheck"
. "."
identifier "MULTIPLE_VAR_DEF"
; ";"
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "annotations"
. "."
identifier "VisibleForTesting"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "DelegateRelationship"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "ObjectLiteralCast"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "SubclassRelationship"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "SubclassType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "AbstractShallowStatementCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "Scope"
. "."
identifier "Var"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "ErrorReporter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "JSDocInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Token"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "EnumType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "FunctionParamBuilder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "FunctionType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "JSType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "JSTypeNative"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "JSTypeRegistry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "ObjectType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "javax"
. "."
identifier "annotation"
. "."
identifier "Nullable"
; ";"
block_comment "/**\n * Creates the symbol table of variables available in th"...
class_declaration
modifiers
final "final"
class "class"
identifier "TypedScopeCreator"
super_interfaces
implements "implements"
type_list
type_identifier "ScopeCreator"
class_body
{ "{"
block_comment "/**\n * A suffix for naming delegate proxies differently fr"...
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DELEGATE_PROXY_SUFFIX"
= "="
method_invocation
identifier "ObjectType"
. "."
identifier "createDelegateSuffix"
argument_list
( "("
string_literal
" "\""
string_fragment "Proxy"
" "\""
) ")"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "LEGACY_TYPEDEF"
= "="
string_literal
" "\""
string_fragment "goog.typedef"
" "\""
; ";"
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ErrorReporter"
variable_declarator
identifier "typeParsingErrorReporter"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "TypeValidator"
variable_declarator
identifier "validator"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CodingConvention"
variable_declarator
identifier "codingConvention"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "typeRegistry"
; ";"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Defer attachment of types to nodes until all type n"...
class_declaration (+118 nodes collapsed)
constructor_declaration (+26 nodes collapsed)
constructor_declaration (+78 nodes collapsed)
block_comment "/**\n * Creates a scope with all types declared. Declares n"...
method_declaration (+303 nodes collapsed)
block_comment "/**\n * Create the outermost scope. This scope contains nat"...
method_declaration (+253 nodes collapsed)
method_declaration (+86 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+40 nodes collapsed)
class_declaration (+411 nodes collapsed)
block_comment "/**\n * Given a node, determines whether that node names a "...
method_declaration (+131 nodes collapsed)
method_declaration (+25 nodes collapsed)
class_declaration (+8015 nodes collapsed)
block_comment "/**\n * A stub declaration without any type information.\n "...
class_declaration (+82 nodes collapsed)
block_comment "/**\n * A shallow traversal of the global scope to build up"...
class_declaration (+637 nodes collapsed)
line_comment "// end GlobalScopeBuilder"
block_comment "/**\n * A shallow traversal of a local scope to find all ar"...
class_declaration
modifiers
private "private"
final "final"
class "class"
identifier "LocalScopeBuilder"
superclass
extends "extends"
type_identifier "AbstractScopeBuilder"
class_body
{ "{"
block_comment "/**\n * @param scope The scope that we're builidng.\n "...
constructor_declaration
modifiers
private "private"
identifier "LocalScopeBuilder"
formal_parameters
( "("
formal_parameter
type_identifier "Scope"
identifier "scope"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "scope"
) ")"
; ";"
} "}"
block_comment "/**\n * Traverse the scope root and build it.\n */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Visit a node in a local scope, and add any local "...
method_declaration (+101 nodes collapsed)
block_comment "/** Handle bleeding functions and function parameters. */"
method_declaration (+147 nodes collapsed)
block_comment "/**\n * Declares all of a function's arguments.\n */"
method_declaration
modifiers
private "private"
void_type "void"
identifier "declareArguments"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "functionNode"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "astParameters"
= "="
method_invocation
method_invocation
identifier "functionNode"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "body"
= "="
method_invocation
identifier "astParameters"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "FunctionType"
variable_declarator
identifier "functionType"
= "="
cast_expression
( "("
type_identifier "FunctionType"
) ")"
method_invocation
identifier "functionNode"
. "."
identifier "getJSType"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "functionType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "jsDocParameters"
= "="
method_invocation
identifier "functionType"
. "."
identifier "getParametersNode"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "jsDocParameters"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "jsDocParameter"
= "="
method_invocation
identifier "jsDocParameters"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
enhanced_for_statement
for "for"
( "("
type_identifier "Node"
identifier "astParameter"
: ":"
method_invocation
identifier "astParameters"
. "."
identifier "children"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "jsDocParameter"
!= "!="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "defineSlot"
argument_list
( "("
identifier "astParameter"
, ","
identifier "functionNode"
, ","
method_invocation
identifier "jsDocParameter"
. "."
identifier "getJSType"
argument_list
( "("
) ")"
, ","
true "true"
) ")"
; ";"
expression_statement
assignment_expression
identifier "jsDocParameter"
= "="
method_invocation
identifier "jsDocParameter"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
method_invocation
identifier "defineSlot"
argument_list
( "("
identifier "astParameter"
, ","
identifier "functionNode"
, ","
null_literal "null"
, ","
true "true"
) ")"
; ";"
} "}"
} "}"
} "}"
} "}"
} "}"
line_comment "// end declareArguments"
} "}"
line_comment "// end LocalScopeBuilder"
block_comment "/** Find the best JSDoc for the given node. */"
method_declaration (+207 nodes collapsed)
block_comment "/** Find the l-value that the given r-value is being assigne"...
method_declaration (+154 nodes collapsed)
block_comment "/** Get the name of the given l-value node. */"
method_declaration (+159 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright 2004 The Closure Compiler Authors.\n *\n * Lic"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "TypeCheck"
. "."
identifier "ENUM_DUP"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "TypeCheck"
. "."
identifier "ENUM_NOT_CONSTANT"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "TypeCheck"
. "."
identifier "MULTIPLE_VAR_DEF"
; ";"
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration (+23 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "annotations"
. "."
identifier "VisibleForTesting"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "DelegateRelationship"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "ObjectLiteralCast"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "SubclassRelationship"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CodingConvention"
. "."
identifier "SubclassType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "NodeTraversal"
. "."
identifier "AbstractShallowStatementCallback"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "Scope"
. "."
identifier "Var"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "ErrorReporter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "JSDocInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Token"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "EnumType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "FunctionParamBuilder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "FunctionType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "JSType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "JSTypeNative"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "JSTypeRegistry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
. "."
identifier "ObjectType"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "javax"
. "."
identifier "annotation"
. "."
identifier "Nullable"
; ";"
block_comment "/**\n * Creates the symbol table of variables available in th"...
class_declaration
modifiers
final "final"
class "class"
identifier "TypedScopeCreator"
super_interfaces
implements "implements"
type_list
type_identifier "ScopeCreator"
class_body
{ "{"
block_comment "/**\n * A suffix for naming delegate proxies differently fr"...
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DELEGATE_PROXY_SUFFIX"
= "="
method_invocation
identifier "ObjectType"
. "."
identifier "createDelegateSuffix"
argument_list
( "("
string_literal
" "\""
string_fragment "Proxy"
" "\""
) ")"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "LEGACY_TYPEDEF"
= "="
string_literal
" "\""
string_fragment "goog.typedef"
" "\""
; ";"
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ErrorReporter"
variable_declarator
identifier "typeParsingErrorReporter"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "TypeValidator"
variable_declarator
identifier "validator"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CodingConvention"
variable_declarator
identifier "codingConvention"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "typeRegistry"
; ";"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Defer attachment of types to nodes until all type n"...
class_declaration (+118 nodes collapsed)
constructor_declaration (+26 nodes collapsed)
constructor_declaration (+78 nodes collapsed)
block_comment "/**\n * Creates a scope with all types declared. Declares n"...
method_declaration (+303 nodes collapsed)
block_comment "/**\n * Create the outermost scope. This scope contains nat"...
method_declaration (+253 nodes collapsed)
method_declaration (+86 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+40 nodes collapsed)
class_declaration (+411 nodes collapsed)
block_comment "/**\n * Given a node, determines whether that node names a "...
method_declaration (+131 nodes collapsed)
method_declaration (+25 nodes collapsed)
class_declaration (+8015 nodes collapsed)
block_comment "/**\n * A stub declaration without any type information.\n "...
class_declaration (+82 nodes collapsed)
block_comment "/**\n * A shallow traversal of the global scope to build up"...
class_declaration (+637 nodes collapsed)
line_comment "// end GlobalScopeBuilder"
block_comment "/**\n * A shallow traversal of a local scope to find all ar"...
class_declaration
modifiers
private "private"
final "final"
class "class"
identifier "LocalScopeBuilder"
superclass
extends "extends"
type_identifier "AbstractScopeBuilder"
class_body
{ "{"
block_comment "/**\n * @param scope The scope that we're builidng.\n "...
constructor_declaration
modifiers
private "private"
identifier "LocalScopeBuilder"
formal_parameters
( "("
formal_parameter
type_identifier "Scope"
identifier "scope"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "scope"
) ")"
; ";"
} "}"
block_comment "/**\n * Traverse the scope root and build it.\n */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Visit a node in a local scope, and add any local "...
method_declaration (+101 nodes collapsed)
block_comment "/** Handle bleeding functions and function parameters. */"
method_declaration (+147 nodes collapsed)
block_comment "/**\n * Declares all of a function's arguments.\n */"
method_declaration
modifiers
private "private"
void_type "void"
identifier "declareArguments"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "functionNode"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "astParameters"
= "="
method_invocation
method_invocation
identifier "functionNode"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "body"
= "="
method_invocation
identifier "astParameters"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "FunctionType"
variable_declarator
identifier "functionType"
= "="
cast_expression
( "("
type_identifier "FunctionType"
) ")"
method_invocation
identifier "functionNode"
. "."
identifier "getJSType"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "functionType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "jsDocParameters"
= "="
method_invocation
identifier "functionType"
. "."
identifier "getParametersNode"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "jsDocParameters"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "jsDocParameter"
= "="
method_invocation
identifier "jsDocParameters"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
enhanced_for_statement
for "for"
( "("
type_identifier "Node"
identifier "astParameter"
: ":"
method_invocation
identifier "astParameters"
. "."
identifier "children"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "jsDocParameter"
!= "!="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "defineSlot"
argument_list
( "("
identifier "astParameter"
, ","
identifier "functionNode"
, ","
method_invocation
identifier "jsDocParameter"
. "."
identifier "getJSType"
argument_list
( "("
) ")"
, ","
false "false"
) ")"
; ";"
expression_statement
assignment_expression
identifier "jsDocParameter"
= "="
method_invocation
identifier "jsDocParameter"
. "."
identifier "getNext"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
method_invocation
identifier "defineSlot"
argument_list
( "("
identifier "astParameter"
, ","
identifier "functionNode"
, ","
null_literal "null"
, ","
true "true"
) ")"
; ";"
} "}"
} "}"
} "}"
} "}"
} "}"
line_comment "// end declareArguments"
} "}"
line_comment "// end LocalScopeBuilder"
block_comment "/** Find the best JSDoc for the given node. */"
method_declaration (+207 nodes collapsed)
block_comment "/** Find the l-value that the given r-value is being assigne"...
method_declaration (+154 nodes collapsed)
block_comment "/** Get the name of the given l-value node. */"
method_declaration (+159 nodes collapsed)
} "}"