class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "typeRegistry"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSType"
variable_declarator
identifier "allValueTypes"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "shouldReport"
= "="
true "true"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSType"
variable_declarator
identifier "nullOrUndefined"
; ";"
line_comment "// TODO(nicksantos): Provide accessors to better filter the "...
line_comment "// mismatches. For example, if we pass (Cake|null) where onl"...
line_comment "// allowed, that doesn't mean we should invalidate all Cakes"...
field_declaration (+21 nodes collapsed)
line_comment "// User warnings"
field_declaration (+28 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+45 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+45 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+32 nodes collapsed)
constructor_declaration (+77 nodes collapsed)
block_comment "/**\n * Gets a list of type violations.\n *\n * For each "...
method_declaration
generic_type
type_identifier "Iterable"
type_arguments
< "<"
type_identifier "TypeMismatch"
> ">"
identifier "getMismatches"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mismatches"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
line_comment "// All non-private methods should have the form:"
line_comment "// expectCondition(NodeTraversal t, Node n, ...);"
line_comment "// If there is a mismatch, the {@code expect} method should "...
line_comment "// a warning and attempt to correct the mismatch, when possi"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Expect the type to be an object, or a type converti"...
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Expect the type to be an object. Unlike expectObjec"...
method_declaration (+57 nodes collapsed)
block_comment "/**\n * Expect the type to contain an object sometimes. If "...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * Expect the type to be a string, or a type convertib"...
method_declaration (+57 nodes collapsed)
block_comment "/**\n * Expect the type to be a number, or a type convertib"...
method_declaration (+57 nodes collapsed)
block_comment "/**\n * Expect the type to be a valid operand to a bitwise "...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Expect the type to be a number or string, or a type"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * Expect the type to be anything but the null or void"...
method_declaration (+150 nodes collapsed)
method_declaration (+80 nodes collapsed)
block_comment "/**\n * Expect that the type of a switch condition matches "...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * Expect that the first type can be addressed with GE"...
method_declaration (+328 nodes collapsed)
block_comment "/**\n * Expect that the first type can be assigned to a sym"...
method_declaration (+194 nodes collapsed)
block_comment "/**\n * Expect that the first type can be assigned to a sym"...
method_declaration (+70 nodes collapsed)
block_comment "/**\n * Expect that the type of an argument matches the typ"...
method_declaration (+100 nodes collapsed)
block_comment "/**\n * Expect that the first type can override a property "...
method_declaration (+102 nodes collapsed)
block_comment "/**\n * Expect that the first type is the direct superclass"...
method_declaration (+257 nodes collapsed)
block_comment "/**\n * Expect that the first type can be cast to the secon"...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * Expect that the given variable has not been declare"...
method_declaration (+470 nodes collapsed)
block_comment "/**\n * Expect that all properties on interfaces that this "...
method_declaration (+107 nodes collapsed)
block_comment "/**\n * Expect that the property in an interface that this "...
method_declaration (+402 nodes collapsed)
block_comment "/**\n * Report a type mismatch\n */"
method_declaration (+52 nodes collapsed)
method_declaration (+51 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+279 nodes collapsed)
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Formats a found/required error message.\n */"
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Given a node, get a human-readable name for the typ"...
method_declaration
type_identifier "String"
identifier "getReadableJSTypeName"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
, ","
formal_parameter
boolean_type "boolean"
identifier "dereference"
) ")"
block
{ "{"
line_comment "// The best type name is the actual type name."
line_comment "// If we're analyzing a GETPROP, the property may be inherit"...
line_comment "// prototype chain. So climb the prototype chain and find ou"...
line_comment "// the property was originally defined."
if_statement (+216 nodes collapsed)
local_variable_declaration
type_identifier "JSType"
variable_declarator
identifier "type"
= "="
method_invocation
identifier "getJSType"
argument_list
( "("
identifier "n"
) ")"
; ";"
if_statement (+40 nodes collapsed)
if_statement (+58 nodes collapsed)
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "qualifiedName"
= "="
method_invocation
identifier "n"
. "."
identifier "getQualifiedName"
argument_list
( "("
) ")"
; ";"
if_statement (+54 nodes collapsed)
} "}"
block_comment "/**\n * This method gets the JSType from the Node argument "...
method_declaration (+60 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration (+37 nodes collapsed)
block_comment "/**\n * Signals that the first type and the second type hav"...
class_declaration (+258 nodes collapsed)
} "}"