class_body
{ "{"
line_comment "//"
line_comment "// Internal errors"
line_comment "//"
field_declaration (+25 nodes collapsed)
line_comment "//"
line_comment "// User errors"
line_comment "//"
field_declaration (+26 nodes collapsed)
line_comment "//"
line_comment "// User warnings"
line_comment "//"
field_declaration
modifiers
protected "protected"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "OVERRIDING_PROTOTYPE_WITH_NON_OBJECT"
= "="
string_literal
" "\""
string_fragment "overriding prototype with non-object"
" "\""
; ";"
line_comment "// TODO(user): make all the non private messages private onc"...
line_comment "// TypedScopeCreator has been merged with the type checker."
field_declaration (+39 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+25 nodes collapsed)
line_comment "// disabled by default. This one only makes sense if you're "...
line_comment "// well-typed externs."
field_declaration (+25 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+29 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+37 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+45 nodes collapsed)
field_declaration
modifiers
static "static"
final "final"
type_identifier "DiagnosticType"
variable_declarator
identifier "HIDDEN_INTERFACE_PROPERTY_MISMATCH"
= "="
method_invocation
identifier "DiagnosticType"
. "."
identifier "warning"
argument_list
( "("
string_literal
" "\""
string_fragment "JSC_HIDDEN_INTERFACE_PROPERTY_MISMATCH"
" "\""
, ","
binary_expression
binary_expression
binary_expression
string_literal
" "\""
string_fragment "mismatch of the {0} property type and the type "
" "\""
+ "+"
string_literal
" "\""
string_fragment "of the property it overrides from interface {1}"
escape_sequence "\\n"
" "\""
+ "+"
string_literal
" "\""
string_fragment "original: {2}"
escape_sequence "\\n"
" "\""
+ "+"
string_literal
" "\""
string_fragment "override: {3}"
" "\""
) ")"
; ";"
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration
modifiers
static "static"
final "final"
type_identifier "DiagnosticGroup"
variable_declarator
identifier "ALL_DIAGNOSTICS"
= "="
object_creation_expression
new "new"
type_identifier "DiagnosticGroup"
argument_list
( "("
identifier "DETERMINISTIC_TEST"
, ","
identifier "DETERMINISTIC_TEST_NO_RESULT"
, ","
identifier "INEXISTENT_ENUM_ELEMENT"
, ","
identifier "INEXISTENT_PROPERTY"
, ","
identifier "NOT_A_CONSTRUCTOR"
, ","
identifier "BIT_OPERATION"
, ","
identifier "NOT_CALLABLE"
, ","
identifier "CONSTRUCTOR_NOT_CALLABLE"
, ","
identifier "FUNCTION_MASKS_VARIABLE"
, ","
identifier "MULTIPLE_VAR_DEF"
, ","
identifier "ENUM_DUP"
, ","
identifier "ENUM_NOT_CONSTANT"
, ","
identifier "INVALID_INTERFACE_MEMBER_DECLARATION"
, ","
identifier "INTERFACE_FUNCTION_NOT_EMPTY"
, ","
identifier "CONFLICTING_EXTENDED_TYPE"
, ","
identifier "BAD_IMPLEMENTED_TYPE"
, ","
identifier "HIDDEN_SUPERCLASS_PROPERTY"
, ","
identifier "HIDDEN_INTERFACE_PROPERTY"
, ","
identifier "HIDDEN_SUPERCLASS_PROPERTY_MISMATCH"
, ","
identifier "HIDDEN_INTERFACE_PROPERTY_MISMATCH"
, ","
identifier "UNKNOWN_OVERRIDE"
, ","
identifier "INTERFACE_METHOD_OVERRIDE"
, ","
identifier "UNKNOWN_EXPR_TYPE"
, ","
identifier "UNRESOLVED_TYPE"
, ","
identifier "WRONG_ARGUMENT_COUNT"
, ","
identifier "ILLEGAL_IMPLICIT_CAST"
, ","
field_access
identifier "TypedScopeCreator"
. "."
identifier "UNKNOWN_LENDS"
, ","
field_access
identifier "TypedScopeCreator"
. "."
identifier "LENDS_ON_NON_OBJECT"
, ","
field_access
identifier "TypedScopeCreator"
. "."
identifier "CTOR_INITIALIZER"
, ","
field_access
identifier "TypedScopeCreator"
. "."
identifier "IFACE_INITIALIZER"
, ","
field_access
identifier "FunctionTypeBuilder"
. "."
identifier "THIS_TYPE_NON_OBJECT"
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "TypeValidator"
variable_declarator
identifier "validator"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ReverseAbstractInterpreter"
variable_declarator
identifier "reverseInterpreter"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "typeRegistry"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Scope"
variable_declarator
identifier "topScope"
; ";"
field_declaration
modifiers
private "private"
type_identifier "ScopeCreator"
variable_declarator
identifier "scopeCreator"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CheckLevel"
variable_declarator
identifier "reportMissingOverride"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CheckLevel"
variable_declarator
identifier "reportUnknownTypes"
; ";"
line_comment "// This may be expensive, so don't emit these warnings if th"...
line_comment "// explicitly turned off."
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "reportMissingProperties"
= "="
true "true"
; ";"
field_declaration
modifiers
private "private"
type_identifier "InferJSDocInfo"
variable_declarator
identifier "inferJSDocInfo"
= "="
null_literal "null"
; ";"
line_comment "// These fields are used to calculate the percentage of expr"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "typedCount"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "nullCount"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "unknownCount"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "inExterns"
; ";"
line_comment "// A state boolean to see we are currently in @notypecheck s"...
line_comment "// code."
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "noTypeCheckSection"
= "="
decimal_integer_literal "0"
; ";"
constructor_declaration (+130 nodes collapsed)
constructor_declaration (+48 nodes collapsed)
constructor_declaration (+44 nodes collapsed)
block_comment "/** Turn on the missing property check. Returns this for eas"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Main entry point for this phase of processing. This"...
method_declaration (+119 nodes collapsed)
block_comment "/** Main entry point of this phase for testing code. */"
method_declaration (+154 nodes collapsed)
method_declaration (+100 nodes collapsed)
method_declaration (+146 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+207 nodes collapsed)
block_comment "/**\n * This is the meat of the type checking. It is basic"...
method_declaration (+2709 nodes collapsed)
block_comment "/**\n * Counts the given node in the typed statistics.\n *"...
method_declaration (+114 nodes collapsed)
block_comment "/**\n * Visits an assignment <code>lvalue = rvalue</code>. "...
method_declaration (+899 nodes collapsed)
block_comment "/**\n * Visits an object literal field definition <code>key"...
method_declaration (+302 nodes collapsed)
block_comment "/**\n * Returns true if any type in the chain has an implic"...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * Given a constructor type and a property name, check"...
method_declaration
modifiers
private "private"
void_type "void"
identifier "checkDeclaredPropertyInheritance"
formal_parameters (+26 nodes collapsed)
block
{ "{"
line_comment "// If the supertype doesn't resolve correctly, we've warned "...
line_comment "// already."
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "hasUnknownOrEmptySupertype"
argument_list
( "("
identifier "ctorType"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
; ";"
} "}"
local_variable_declaration
type_identifier "FunctionType"
variable_declarator
identifier "superClass"
= "="
method_invocation
identifier "ctorType"
. "."
identifier "getSuperClassConstructor"
argument_list
( "("
) ")"
; ";"
local_variable_declaration (+26 nodes collapsed)
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "declaredOverride"
= "="
binary_expression
binary_expression
identifier "info"
!= "!="
null_literal "null"
&& "&&"
method_invocation
identifier "info"
. "."
identifier "isOverride"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "foundInterfaceProperty"
= "="
false "false"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "ctorType"
. "."
identifier "isConstructor"
argument_list
( "("
) ")"
) ")"
block
{ "{"
enhanced_for_statement
for "for"
( "("
type_identifier "JSType"
identifier "implementedInterface"
: ":"
method_invocation
identifier "ctorType"
. "."
identifier "getImplementedInterfaces"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement (+27 nodes collapsed)
local_variable_declaration
type_identifier "FunctionType"
variable_declarator
identifier "interfaceType"
= "="
method_invocation
method_invocation
identifier "implementedInterface"
. "."
identifier "toObjectType"
argument_list
( "("
) ")"
. "."
identifier "getConstructor"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "Preconditions"
. "."
identifier "checkNotNull"
argument_list
( "("
identifier "interfaceType"
) ")"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "interfaceHasProperty"
= "="
method_invocation
method_invocation
identifier "interfaceType"
. "."
identifier "getPrototype"
argument_list
( "("
) ")"
. "."
identifier "hasProperty"
argument_list
( "("
identifier "propertyName"
) ")"
; ";"
expression_statement
assignment_expression
identifier "foundInterfaceProperty"
= "="
binary_expression
identifier "foundInterfaceProperty"
|| "||"
identifier "interfaceHasProperty"
; ";"
if_statement (+63 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
identifier "interfaceHasProperty"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "JSType"
variable_declarator
identifier "interfacePropType"
= "="
method_invocation
method_invocation
identifier "interfaceType"
. "."
identifier "getPrototype"
argument_list
( "("
) ")"
. "."
identifier "getPropertyType"
argument_list
( "("
identifier "propertyName"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "propertyType"
. "."
identifier "canAssignTo"
argument_list
( "("
identifier "interfacePropType"
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "compiler"
. "."
identifier "report"
argument_list
( "("
method_invocation
identifier "t"
. "."
identifier "makeError"
argument_list
( "("
identifier "n"
, ","
identifier "HIDDEN_INTERFACE_PROPERTY_MISMATCH"
, ","
identifier "propertyName"
, ","
method_invocation
method_invocation
identifier "interfaceType"
. "."
identifier "getTopMostDefiningType"
argument_list
( "("
identifier "propertyName"
) ")"
. "."
identifier "toString"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "interfacePropType"
. "."
identifier "toString"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "propertyType"
. "."
identifier "toString"
argument_list
( "("
) ")"
) ")"
) ")"
; ";"
} "}"
} "}"
} "}"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
unary_expression
! "!"
identifier "declaredOverride"
&& "&&"
unary_expression
! "!"
identifier "superClassHasProperty"
) ")"
block
{ "{"
line_comment "// nothing to do here, it's just a plain new property"
return_statement
return "return"
; ";"
} "}"
local_variable_declaration
type_identifier "JSType"
variable_declarator
identifier "topInstanceType"
= "="
ternary_expression
identifier "superClassHasProperty"
? "?"
method_invocation
identifier "superClass"
. "."
identifier "getTopMostDefiningType"
argument_list
( "("
identifier "propertyName"
) ")"
: ":"
null_literal "null"
; ";"
if_statement (+65 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
identifier "declaredOverride"
) ")"
block
{ "{"
line_comment "// there's no @override to check"
return_statement
return "return"
; ";"
} "}"
line_comment "// @override is present and we have to check that it is ok"
if_statement (+141 nodes collapsed)
} "}"
block_comment "/**\n * Given a constructor or an interface type, find out "...
method_declaration (+185 nodes collapsed)
block_comment "/**\n * Visits an ASSIGN node for cases such as\n * <pre>\n"...
method_declaration (+237 nodes collapsed)
block_comment "/**\n * Visits an ASSIGN node for cases such as\n * <pre>\n"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Visits a NAME node.\n *\n * @param t The node tra"...
method_declaration (+208 nodes collapsed)
block_comment "/**\n * Visits a GETPROP node.\n *\n * @param t The node "...
method_declaration (+185 nodes collapsed)
block_comment "/**\n * Make sure that the access of this property is ok.\n "...
method_declaration (+232 nodes collapsed)
block_comment "/**\n * Determines whether this node is testing for the exi"...
method_declaration (+226 nodes collapsed)
block_comment "/**\n * Visits a GETELEM node.\n *\n * @param t The node "...
method_declaration (+80 nodes collapsed)
block_comment "/**\n * Visits a VAR node.\n *\n * @param t The node trav"...
method_declaration (+301 nodes collapsed)
block_comment "/**\n * Visits a NEW node.\n */"
method_declaration (+196 nodes collapsed)
block_comment "/**\n * Visits a {@link Token#FUNCTION} node.\n *\n * @pa"...
method_declaration (+353 nodes collapsed)
block_comment "/**\n * Visits a CALL node.\n *\n * @param t The node tra"...
method_declaration (+218 nodes collapsed)
block_comment "/**\n * Visits the parameters of a CALL or a NEW node.\n *"...
method_declaration (+357 nodes collapsed)
block_comment "/**\n * Visits a RETURN node.\n *\n * @param t The node t"...
method_declaration (+206 nodes collapsed)
block_comment "/**\n * This function unifies the type checking involved in"...
method_declaration (+485 nodes collapsed)
block_comment "/**\n * <p>Checks the initializer of an enum. An enum can b"...
method_declaration (+204 nodes collapsed)
block_comment "/**\n * This predicate is used to determine if the node rep"...
method_declaration (+66 nodes collapsed)
block_comment "/**\n * This method gets the JSType from the Node argument "...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Gets the type of the node or {@code null} if the no"...
method_declaration (+87 nodes collapsed)
line_comment "// TODO(nicksantos): TypeCheck should never be attaching typ"...
line_comment "// All types should be attached by TypeInference. This is no"...
line_comment "// for legacy reasons. There are a number of places where Ty"...
line_comment "// doesn't attach a type, as a signal to TypeCheck that it n"...
line_comment "// that node's type."
block_comment "/**\n * Ensure that the given node has a type. If it does n"...
method_declaration (+35 nodes collapsed)
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Enforces type casts, and ensures the node is typed."...
method_declaration (+258 nodes collapsed)
block_comment "/**\n * Returns the percentage of nodes typed by the type c"...
method_declaration (+57 nodes collapsed)
method_declaration (+25 nodes collapsed)
} "}"