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–404 unchanged (404 lines)
405 }
406
407 @Override
408 public boolean hasProperty(String name) {
409 return super.hasProperty(name) || "prototype".equals(name);
410 }
411
412
413 @Override
414 public JSType getPropertyType(String name) {
415 if ("prototype".equals(name)) {
416 return getPrototype();
417 } else {
…lines 418–465 unchanged (48 lines)
466 @Override
467 boolean defineProperty(String name, JSType type,
468 boolean inferred, boolean inExterns) {
469 if ("prototype".equals(name)) {
470 ObjectType objType = type.toObjectType();
471 if (objType != null) {
472 return setPrototype(
473 new FunctionPrototypeType(
474 registry, this, objType, isNativeObjectType()));
475 } else {
476 return false;
477 }
478 }
…lines 479–849 unchanged (371 lines)

After

…lines 1–405 unchanged (405 lines)
406
407 @Override
408 public boolean hasProperty(String name) {
409 return super.hasProperty(name) || "prototype".equals(name);
410 }
411
412 @Override
413 public boolean hasOwnProperty(String name) {
414 return super.hasOwnProperty(name) || "prototype".equals(name);
415 }
416
417 @Override
418 public JSType getPropertyType(String name) {
419 if ("prototype".equals(name)) {
420 return getPrototype();
421 } else {
…lines 422–469 unchanged (48 lines)
470 @Override
471 boolean defineProperty(String name, JSType type,
472 boolean inferred, boolean inExterns) {
473 if ("prototype".equals(name)) {
474 ObjectType objType = type.toObjectType();
475 if (objType != null) {
476 if (objType.equals(prototype)) {
477 return true;
478 }
479 return setPrototype(
480 new FunctionPrototypeType(
481 registry, this, objType, isNativeObjectType()));
482 } else {
483 return false;
484 }
…lines 485–856 unchanged (372 lines)

Before

program
block_comment "/*\n *\n * ***** BEGIN LICENSE BLOCK *****\n * Version: MPL 1.1"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
; ";"
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 "ImmutableList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Iterables"
; ";"
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
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Sets"
; ";"
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 "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
identifier "java"
. "."
identifier "util"
. "."
identifier "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * This derived type provides extended information about"...
class_declaration
modifiers
public "public"
class "class"
identifier "FunctionType"
superclass
extends "extends"
type_identifier "PrototypeObjectType"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
enum_declaration
modifiers
private "private"
enum "enum"
identifier "Kind"
enum_body
{ "{"
enum_constant
identifier "ORDINARY"
, ","
enum_constant
identifier "CONSTRUCTOR"
, ","
enum_constant
identifier "INTERFACE"
} "}"
block_comment "/**\n * {@code [[Call]]} property.\n */"
field_declaration
modifiers
private "private"
type_identifier "ArrowType"
variable_declarator
identifier "call"
; ";"
block_comment "/**\n * The {@code prototype} property. This field is lazil"...
field_declaration
modifiers
private "private"
type_identifier "FunctionPrototypeType"
variable_declarator
identifier "prototype"
; ";"
block_comment "/**\n * Whether a function is a constructor, an interface, "...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Kind"
variable_declarator
identifier "kind"
; ";"
block_comment "/**\n * The type of {@code this} in the scope of this funct"...
field_declaration
modifiers
private "private"
type_identifier "ObjectType"
variable_declarator
identifier "typeOfThis"
; ";"
block_comment "/**\n * The function node which this type represents. It ma"...
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "source"
; ";"
block_comment "/**\n * The interfaces directly implemented by this functio"...
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "ObjectType"
> ">"
variable_declarator
identifier "implementedInterfaces"
= "="
method_invocation
identifier "ImmutableList"
. "."
identifier "of"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * The types which are subtypes of this function. It i"...
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "FunctionType"
> ">"
variable_declarator
identifier "subTypes"
; ";"
block_comment "/**\n * The template type name. May be {@code null}.\n */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "templateTypeName"
; ";"
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+55 nodes collapsed)
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+56 nodes collapsed)
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+60 nodes collapsed)
block_comment "/** Creates an instance for a function that might be a const"...
constructor_declaration (+244 nodes collapsed)
block_comment "/** Creates an instance for a function that is an interface."...
constructor_declaration (+128 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "isFunctionType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "canBeCalled"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+63 nodes collapsed)
block_comment "/** Gets an LP node that contains all params. May be null. *"...
method_declaration (+26 nodes collapsed)
block_comment "/** Gets the minimum number of arguments that this function "...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Gets the maximum number of arguments that this func"...
method_declaration (+88 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Gets the {@code prototype} property of this functio"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * Sets the prototype, creating the prototype object f"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Sets the prototype.\n * @param prototype the proto"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * Returns all interfaces implemented by a class or it"...
method_declaration (+63 nodes collapsed)
method_declaration (+118 nodes collapsed)
block_comment "/** Returns interfaces implemented directly by a class or it"...
method_declaration (+75 nodes collapsed)
method_declaration (+59 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+373 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "defineProperty"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
, ","
formal_parameter
type_identifier "JSType"
identifier "type"
, ","
formal_parameter
boolean_type "boolean"
identifier "inferred"
, ","
formal_parameter
boolean_type "boolean"
identifier "inExterns"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
string_literal
" "\""
string_fragment "prototype"
" "\""
. "."
identifier "equals"
argument_list
( "("
identifier "name"
) ")"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "ObjectType"
variable_declarator
identifier "objType"
= "="
method_invocation
identifier "type"
. "."
identifier "toObjectType"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "objType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
return_statement (+25 nodes collapsed)
} "}"
else "else"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
return_statement
return "return"
method_invocation
super "super"
. "."
identifier "defineProperty"
argument_list
( "("
identifier "name"
, ","
identifier "type"
, ","
identifier "inferred"
, ","
identifier "inExterns"
) ")"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+153 nodes collapsed)
method_declaration (+140 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type, get its s"...
method_declaration (+75 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type, find out "...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type and a prop"...
method_declaration (+126 nodes collapsed)
block_comment "/**\n * Two function types are equal if their signatures ma"...
method_declaration (+220 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Informally, a function is represented by\n * {@cod"...
method_declaration (+442 nodes collapsed)
block_comment "/** Gets the string representation of a var args param. */"
method_declaration (+100 nodes collapsed)
block_comment "/**\n * A function is a subtype of another if their call me"...
method_declaration (+263 nodes collapsed)
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Gets the type of instance of this function.\n * @t"...
method_declaration (+29 nodes collapsed)
block_comment "/** Sets the instance type. This should only be used for spe"...
method_declaration
void_type "void"
identifier "setInstanceType"
formal_parameters
( "("
formal_parameter
type_identifier "ObjectType"
identifier "instanceType"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "typeOfThis"
= "="
identifier "instanceType"
; ";"
} "}"
block_comment "/**\n * Returns whether this function type has an instance "...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Gets the type of {@code this} in this function.\n "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Gets the source node.\n */"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getSource"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "source"
; ";"
} "}"
block_comment "/**\n * Sets the source node.\n */"
method_declaration (+23 nodes collapsed)
block_comment "/** Adds a type to the list of subtypes for this type. */"
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Returns a list of types that are subtypes of this t"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "FunctionType"
> ">"
identifier "getSubTypes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "subTypes"
; ";"
} "}"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Gets the template type name.\n */"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getTemplateTypeName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "templateTypeName"
; ";"
} "}"
method_declaration (+270 nodes collapsed)
} "}"

After

program
block_comment "/*\n *\n * ***** BEGIN LICENSE BLOCK *****\n * Version: MPL 1.1"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
; ";"
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 "ImmutableList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Iterables"
; ";"
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
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Sets"
; ";"
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 "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
identifier "java"
. "."
identifier "util"
. "."
identifier "Collections"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * This derived type provides extended information about"...
class_declaration
modifiers
public "public"
class "class"
identifier "FunctionType"
superclass
extends "extends"
type_identifier "PrototypeObjectType"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
enum_declaration
modifiers
private "private"
enum "enum"
identifier "Kind"
enum_body
{ "{"
enum_constant
identifier "ORDINARY"
, ","
enum_constant
identifier "CONSTRUCTOR"
, ","
enum_constant
identifier "INTERFACE"
} "}"
block_comment "/**\n * {@code [[Call]]} property.\n */"
field_declaration
modifiers
private "private"
type_identifier "ArrowType"
variable_declarator
identifier "call"
; ";"
block_comment "/**\n * The {@code prototype} property. This field is lazil"...
field_declaration
modifiers
private "private"
type_identifier "FunctionPrototypeType"
variable_declarator
identifier "prototype"
; ";"
block_comment "/**\n * Whether a function is a constructor, an interface, "...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Kind"
variable_declarator
identifier "kind"
; ";"
block_comment "/**\n * The type of {@code this} in the scope of this funct"...
field_declaration
modifiers
private "private"
type_identifier "ObjectType"
variable_declarator
identifier "typeOfThis"
; ";"
block_comment "/**\n * The function node which this type represents. It ma"...
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "source"
; ";"
block_comment "/**\n * The interfaces directly implemented by this functio"...
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "ObjectType"
> ">"
variable_declarator
identifier "implementedInterfaces"
= "="
method_invocation
identifier "ImmutableList"
. "."
identifier "of"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * The types which are subtypes of this function. It i"...
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "FunctionType"
> ">"
variable_declarator
identifier "subTypes"
; ";"
block_comment "/**\n * The template type name. May be {@code null}.\n */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "templateTypeName"
; ";"
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+55 nodes collapsed)
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+56 nodes collapsed)
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+60 nodes collapsed)
block_comment "/** Creates an instance for a function that might be a const"...
constructor_declaration (+244 nodes collapsed)
block_comment "/** Creates an instance for a function that is an interface."...
constructor_declaration (+128 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "isFunctionType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "canBeCalled"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+63 nodes collapsed)
block_comment "/** Gets an LP node that contains all params. May be null. *"...
method_declaration (+26 nodes collapsed)
block_comment "/** Gets the minimum number of arguments that this function "...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Gets the maximum number of arguments that this func"...
method_declaration (+88 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Gets the {@code prototype} property of this functio"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * Sets the prototype, creating the prototype object f"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Sets the prototype.\n * @param prototype the proto"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * Returns all interfaces implemented by a class or it"...
method_declaration (+63 nodes collapsed)
method_declaration (+118 nodes collapsed)
block_comment "/** Returns interfaces implemented directly by a class or it"...
method_declaration (+75 nodes collapsed)
method_declaration (+59 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "hasOwnProperty"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
method_invocation
super "super"
. "."
identifier "hasOwnProperty"
argument_list
( "("
identifier "name"
) ")"
|| "||"
method_invocation
string_literal
" "\""
string_fragment "prototype"
" "\""
. "."
identifier "equals"
argument_list
( "("
identifier "name"
) ")"
; ";"
} "}"
method_declaration (+373 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "defineProperty"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
, ","
formal_parameter
type_identifier "JSType"
identifier "type"
, ","
formal_parameter
boolean_type "boolean"
identifier "inferred"
, ","
formal_parameter
boolean_type "boolean"
identifier "inExterns"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
string_literal
" "\""
string_fragment "prototype"
" "\""
. "."
identifier "equals"
argument_list
( "("
identifier "name"
) ")"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "ObjectType"
variable_declarator
identifier "objType"
= "="
method_invocation
identifier "type"
. "."
identifier "toObjectType"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "objType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "objType"
. "."
identifier "equals"
argument_list
( "("
identifier "prototype"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
return_statement (+25 nodes collapsed)
} "}"
else "else"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
return_statement
return "return"
method_invocation
super "super"
. "."
identifier "defineProperty"
argument_list
( "("
identifier "name"
, ","
identifier "type"
, ","
identifier "inferred"
, ","
identifier "inExterns"
) ")"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+153 nodes collapsed)
method_declaration (+140 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type, get its s"...
method_declaration (+75 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type, find out "...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type and a prop"...
method_declaration (+126 nodes collapsed)
block_comment "/**\n * Two function types are equal if their signatures ma"...
method_declaration (+220 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Informally, a function is represented by\n * {@cod"...
method_declaration (+442 nodes collapsed)
block_comment "/** Gets the string representation of a var args param. */"
method_declaration (+100 nodes collapsed)
block_comment "/**\n * A function is a subtype of another if their call me"...
method_declaration (+263 nodes collapsed)
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Gets the type of instance of this function.\n * @t"...
method_declaration (+29 nodes collapsed)
block_comment "/** Sets the instance type. This should only be used for spe"...
method_declaration
void_type "void"
identifier "setInstanceType"
formal_parameters
( "("
formal_parameter
type_identifier "ObjectType"
identifier "instanceType"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "typeOfThis"
= "="
identifier "instanceType"
; ";"
} "}"
block_comment "/**\n * Returns whether this function type has an instance "...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Gets the type of {@code this} in this function.\n "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Gets the source node.\n */"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getSource"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "source"
; ";"
} "}"
block_comment "/**\n * Sets the source node.\n */"
method_declaration (+23 nodes collapsed)
block_comment "/** Adds a type to the list of subtypes for this type. */"
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Returns a list of types that are subtypes of this t"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "FunctionType"
> ">"
identifier "getSubTypes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "subTypes"
; ";"
} "}"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Gets the template type name.\n */"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getTemplateTypeName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "templateTypeName"
; ";"
} "}"
method_declaration (+270 nodes collapsed)
} "}"