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–547 unchanged (547 lines)
548
549 public Node getChildBefore(Node child) {
550 if (child == first) {
551 return null;
552 }
553 Node n = first;
554
555 while (n.next != child) {
556 n = n.next;
557 if (n == null) {
558 throw new RuntimeException("node is not a child");
559 }
560 }
…lines 561–2450 unchanged (1890 lines)

After

…lines 1–547 unchanged (547 lines)
548
549 public Node getChildBefore(Node child) {
550 if (child == first) {
551 return null;
552 }
553 Node n = first;
554 if (n == null) {
555 throw new RuntimeException("node is not a child");
556 }
557
558 while (n.next != child) {
559 n = n.next;
560 if (n == null) {
561 throw new RuntimeException("node is not a child");
562 }
…lines 563–2453 unchanged (1891 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
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
; ";"
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 "Objects"
; ";"
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
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 "SimpleSourceFile"
; ";"
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 "StaticSourceFile"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
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 "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "NoSuchElementException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * This class implements the root of the intermediate re"...
class_declaration
modifiers
public "public"
class "class"
identifier "Node"
super_interfaces
implements "implements"
type_list
type_identifier "Cloneable"
, ","
type_identifier "Serializable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
field_declaration (+161 nodes collapsed)
line_comment "// Unused in the compiler, but keep for Rhino."
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
line_comment "// flags for INCRDECR_PROP"
variable_declarator
identifier "DECR_FLAG"
= "="
hex_integer_literal "0x1"
, ","
variable_declarator
identifier "POST_FLAG"
= "="
hex_integer_literal "0x2"
; ";"
method_declaration (+310 nodes collapsed)
class_declaration (+291 nodes collapsed)
class_declaration (+353 nodes collapsed)
line_comment "// PropListItems must be immutable so that they can be share"...
interface_declaration (+48 nodes collapsed)
class_declaration (+132 nodes collapsed)
line_comment "// A base class for Object storing props"
class_declaration (+182 nodes collapsed)
line_comment "// A base class for int storing props"
class_declaration (+173 nodes collapsed)
constructor_declaration (+34 nodes collapsed)
constructor_declaration (+107 nodes collapsed)
constructor_declaration (+174 nodes collapsed)
constructor_declaration (+208 nodes collapsed)
constructor_declaration (+262 nodes collapsed)
constructor_declaration (+49 nodes collapsed)
constructor_declaration (+50 nodes collapsed)
constructor_declaration (+56 nodes collapsed)
constructor_declaration (+62 nodes collapsed)
constructor_declaration (+68 nodes collapsed)
constructor_declaration (+54 nodes collapsed)
constructor_declaration (+282 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+32 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "type"
; ";"
} "}"
method_declaration (+24 nodes collapsed)
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "hasChildren"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "first"
!= "!="
null_literal "null"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getFirstChild"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "first"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getLastChild"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "last"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getNext"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "next"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getChildBefore"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "child"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "child"
== "=="
identifier "first"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "n"
= "="
identifier "first"
; ";"
while_statement (+49 nodes collapsed)
return_statement
return "return"
identifier "n"
; ";"
} "}"
method_declaration (+52 nodes collapsed)
method_declaration (+78 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+88 nodes collapsed)
method_declaration (+103 nodes collapsed)
method_declaration (+111 nodes collapsed)
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Add 'child' before 'node'.\n */"
method_declaration (+148 nodes collapsed)
block_comment "/**\n * Add 'child' after 'node'.\n */"
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Add all children after 'node'.\n */"
method_declaration (+204 nodes collapsed)
block_comment "/**\n * Detach a child from its parent and siblings.\n */"
method_declaration (+99 nodes collapsed)
block_comment "/**\n * Detaches child from Node and replaces it with newCh"...
method_declaration (+171 nodes collapsed)
method_declaration (+168 nodes collapsed)
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Clone the properties from the provided node without"...
method_declaration (+51 nodes collapsed)
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @param item The item to inspect\n * @param propTyp"...
method_declaration (+125 nodes collapsed)
method_declaration (+53 nodes collapsed)
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Returns the integer value for the property, or 0 if"...
method_declaration (+54 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+55 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+36 nodes collapsed)
line_comment "// Gets all the property types, in sorted order."
method_declaration (+141 nodes collapsed)
block_comment "/** Can only be called when <tt>getType() == TokenStream.NUM"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Can only be called when <tt>getType() == Token.NUMB"...
method_declaration (+72 nodes collapsed)
block_comment "/** Can only be called when node has String context. */"
method_declaration (+68 nodes collapsed)
block_comment "/**\n * Can only be called for a Token.STRING or Token.NAME"...
method_declaration (+86 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+58 nodes collapsed)
method_declaration (+501 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "toStringTree"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "toStringTreeImpl"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+74 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+139 nodes collapsed)
field_declaration
integral_type
int "int"
variable_declarator
identifier "type"
; ";"
line_comment "// type of the node; Token.NAME for example"
field_declaration
type_identifier "Node"
variable_declarator
identifier "next"
; ";"
line_comment "// next sibling"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "first"
; ";"
line_comment "// first element of a linked list of children"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "last"
; ";"
line_comment "// last element of a linked list of children"
block_comment "/**\n * Linked list of properties. Since vast majority of n"...
field_declaration
modifiers
private "private"
type_identifier "PropListItem"
variable_declarator
identifier "propListHead"
; ";"
block_comment "/**\n * COLUMN_BITS represents how many of the lower-order "...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "COLUMN_BITS"
= "="
decimal_integer_literal "12"
; ";"
block_comment "/**\n * MAX_COLUMN_NUMBER represents the maximum column num"...
field_declaration (+21 nodes collapsed)
block_comment "/**\n * COLUMN_MASK stores a value where bits storing the c"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "COLUMN_MASK"
= "="
identifier "MAX_COLUMN_NUMBER"
; ";"
block_comment "/**\n * Source position of this node. The position is encod"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "sourcePosition"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSType"
variable_declarator
identifier "jsType"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "parent"
; ";"
line_comment "//=========================================================="...
line_comment "// Source position management"
method_declaration (+26 nodes collapsed)
block_comment "/** Sets the source file to a non-extern file of the given n"...
method_declaration (+34 nodes collapsed)
method_declaration (+40 nodes collapsed)
block_comment "/** Returns the source file associated with this input. May "...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * @param inputId\n */"
method_declaration (+26 nodes collapsed)
block_comment "/**\n * @return The Id of the CompilerInput associated with"...
method_declaration (+29 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getSourcePosition"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "sourcePosition"
; ";"
} "}"
method_declaration (+60 nodes collapsed)
method_declaration (+32 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Merges the line number and character number in one "...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Extracts the line number and character number from "...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Extracts the character number and character number "...
method_declaration (+48 nodes collapsed)
line_comment "//=========================================================="...
line_comment "// Iteration"
block_comment "/**\n * <p>Return an iterable object that iterates over thi"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Return an iterable object that iterates over thi"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * @see Node#siblings()\n */"
class_declaration (+260 nodes collapsed)
line_comment "// ========================================================="...
line_comment "// Accessors"
method_declaration
type_identifier "PropListItem"
identifier "getPropListHeadForTesting"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "propListHead"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getParent"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "parent"
; ";"
} "}"
block_comment "/**\n * Gets the ancestor node relative to this.\n *\n * "...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Iterates all of the node's ancestors excluding itse"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Iterator to go up the ancestor tree.\n */"
class_declaration (+187 nodes collapsed)
block_comment "/**\n * Check for one child more efficiently than by iterat"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Check for more than one child more efficiently than"...
method_declaration (+24 nodes collapsed)
method_declaration (+55 nodes collapsed)
line_comment "// Intended for testing and verification only."
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Checks if the subtree under this node is the same a"...
method_declaration (+122 nodes collapsed)
block_comment "/**\n * Compare this node to node2 recursively and return t"...
method_declaration (+161 nodes collapsed)
block_comment "/**\n * Compare this node to node2 recursively and return t"...
method_declaration (+141 nodes collapsed)
block_comment "/** Returns true if this node is equivalent semantically to "...
method_declaration (+29 nodes collapsed)
block_comment "/** Checks equivalence without going into inner functions */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Returns true if this node is equivalent semanticall"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * @param compareJsType Whether to compare the JSTypes"...
method_declaration (+464 nodes collapsed)
block_comment "/**\n * This function takes a set of GETPROP nodes and prod"...
method_declaration (+155 nodes collapsed)
block_comment "/**\n * Returns whether a node corresponds to a simple or a"...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Returns whether a node corresponds to a simple or a"...
method_declaration (+81 nodes collapsed)
line_comment "// ========================================================="...
line_comment "// Mutators"
block_comment "/**\n * Removes this node from its parent. Equivalent to:\n "...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Removes the first child of Node. Equivalent to:\n "...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * @return A Node that is the head of the list of chil"...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * Removes all children from this node and isolates th"...
method_declaration (+79 nodes collapsed)
method_declaration (+118 nodes collapsed)
block_comment "/**\n * @return A detached clone of the Node, specifically "...
method_declaration (+106 nodes collapsed)
block_comment "/**\n * @return A detached clone of the Node and all its ch"...
method_declaration (+141 nodes collapsed)
block_comment "/**\n * Copies source file and name information from the ot"...
line_comment "// TODO(nicksantos): The semantics of this method are ill-de"...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Copies source file and name information from the ot"...
line_comment "// TODO(nicksantos): The semantics of this method are ill-de"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node w"...
method_declaration (+61 nodes collapsed)
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node a"...
method_declaration (+69 nodes collapsed)
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node w"...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node a"...
method_declaration (+69 nodes collapsed)
line_comment "//=========================================================="...
line_comment "// Custom annotations"
method_declaration
modifiers
public "public"
type_identifier "JSType"
identifier "getJSType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "jsType"
; ";"
} "}"
method_declaration (+23 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "FileLevelJsDocBuilder"
identifier "getJsDocBuilderForNode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "FileLevelJsDocBuilder"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * An inner class that provides back-door access to th"...
class_declaration (+113 nodes collapsed)
block_comment "/**\n * Get the {@link JSDocInfo} attached to this node.\n "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Sets the {@link JSDocInfo} attached to this node.\n "...
method_declaration (+28 nodes collapsed)
block_comment "/** This node was last changed at {@code time} */"
method_declaration (+25 nodes collapsed)
block_comment "/** Returns the time of the last change for this node */"
method_declaration (+21 nodes collapsed)
block_comment "/**\n * Sets whether this node is a variable length argumen"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this node is a variable length argu"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isVarArgs"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "VAR_ARGS_NAME"
) ")"
; ";"
} "}"
block_comment "/**\n * Sets whether this node is an optional argument node"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this node is an optional argument n"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isOptionalArg"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "OPT_ARG_NAME"
) ")"
; ";"
} "}"
block_comment "/**\n * Sets whether this is a synthetic block that should "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this is a synthetic block that shou"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isSyntheticBlock"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "SYNTHETIC_BLOCK_PROP"
) ")"
; ";"
} "}"
block_comment "/**\n * Sets the ES5 directives on this node.\n */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Returns the set of ES5 directives for this node.\n "...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Adds a warning to be suppressed. This is indistingu"...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Sets whether this is a synthetic block that should "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this is a synthetic block that shou"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "wasEmptyNode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "EMPTY_BLOCK"
) ")"
; ";"
} "}"
line_comment "// There are four values of interest:"
line_comment "// global state changes"
line_comment "// this state changes"
line_comment "// arguments state changes"
line_comment "// whether the call throws an exception"
line_comment "// locality of the result"
line_comment "// We want a value of 0 to mean \"global state changes and"
line_comment "// unknown locality of result\"."
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_GLOBAL_STATE_UNMODIFIED"
= "="
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_THIS_UNMODIFIED"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_ARGUMENTS_UNMODIFIED"
= "="
decimal_integer_literal "4"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_NO_THROWS"
= "="
decimal_integer_literal "8"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_LOCAL_RESULTS"
= "="
decimal_integer_literal "16"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SIDE_EFFECTS_FLAGS_MASK"
= "="
decimal_integer_literal "31"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SIDE_EFFECTS_ALL"
= "="
decimal_integer_literal "0"
; ";"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Marks this function or constructor call's side effe"...
method_declaration (+77 nodes collapsed)
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Returns the side effects flags for this node.\n */"
method_declaration (+21 nodes collapsed)
block_comment "/**\n * A helper class for getting and setting the side-eff"...
class_declaration (+345 nodes collapsed)
block_comment "/**\n * @return Whether the only side-effect is \"modifies t"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @return Whether the only side-effect is \"modifies a"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Returns true if this node is a function or construc"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Returns true if this node is a function or construc"...
method_declaration (+26 nodes collapsed)
block_comment "/** Returns true if this is a new/call that may mutate its a"...
method_declaration (+28 nodes collapsed)
block_comment "/** Returns true if this is a new/call that may mutate globa"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * returns true if all the flags are set in value.\n "...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * This should only be called for STRING nodes childre"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isQuotedString"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
block_comment "/**\n * This should only be called for STRING nodes childre"...
method_declaration (+24 nodes collapsed)
class_declaration (+160 nodes collapsed)
block_comment "/*** AST type check methods ***/"
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 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
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
; ";"
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 "Objects"
; ";"
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
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 "SimpleSourceFile"
; ";"
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 "StaticSourceFile"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
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 "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "NoSuchElementException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
block_comment "/**\n * This class implements the root of the intermediate re"...
class_declaration
modifiers
public "public"
class "class"
identifier "Node"
super_interfaces
implements "implements"
type_list
type_identifier "Cloneable"
, ","
type_identifier "Serializable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
field_declaration (+161 nodes collapsed)
line_comment "// Unused in the compiler, but keep for Rhino."
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
line_comment "// flags for INCRDECR_PROP"
variable_declarator
identifier "DECR_FLAG"
= "="
hex_integer_literal "0x1"
, ","
variable_declarator
identifier "POST_FLAG"
= "="
hex_integer_literal "0x2"
; ";"
method_declaration (+310 nodes collapsed)
class_declaration (+291 nodes collapsed)
class_declaration (+353 nodes collapsed)
line_comment "// PropListItems must be immutable so that they can be share"...
interface_declaration (+48 nodes collapsed)
class_declaration (+132 nodes collapsed)
line_comment "// A base class for Object storing props"
class_declaration (+182 nodes collapsed)
line_comment "// A base class for int storing props"
class_declaration (+173 nodes collapsed)
constructor_declaration (+34 nodes collapsed)
constructor_declaration (+107 nodes collapsed)
constructor_declaration (+174 nodes collapsed)
constructor_declaration (+208 nodes collapsed)
constructor_declaration (+262 nodes collapsed)
constructor_declaration (+49 nodes collapsed)
constructor_declaration (+50 nodes collapsed)
constructor_declaration (+56 nodes collapsed)
constructor_declaration (+62 nodes collapsed)
constructor_declaration (+68 nodes collapsed)
constructor_declaration (+54 nodes collapsed)
constructor_declaration (+282 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+32 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "type"
; ";"
} "}"
method_declaration (+24 nodes collapsed)
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "hasChildren"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "first"
!= "!="
null_literal "null"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getFirstChild"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "first"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getLastChild"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "last"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getNext"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "next"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getChildBefore"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "child"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "child"
== "=="
identifier "first"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "n"
= "="
identifier "first"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "n"
== "=="
null_literal "null"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "RuntimeException"
argument_list
( "("
string_literal
" "\""
string_fragment "node is not a child"
" "\""
) ")"
; ";"
} "}"
while_statement (+49 nodes collapsed)
return_statement
return "return"
identifier "n"
; ";"
} "}"
method_declaration (+52 nodes collapsed)
method_declaration (+78 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+88 nodes collapsed)
method_declaration (+103 nodes collapsed)
method_declaration (+111 nodes collapsed)
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Add 'child' before 'node'.\n */"
method_declaration (+148 nodes collapsed)
block_comment "/**\n * Add 'child' after 'node'.\n */"
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Add all children after 'node'.\n */"
method_declaration (+204 nodes collapsed)
block_comment "/**\n * Detach a child from its parent and siblings.\n */"
method_declaration (+99 nodes collapsed)
block_comment "/**\n * Detaches child from Node and replaces it with newCh"...
method_declaration (+171 nodes collapsed)
method_declaration (+168 nodes collapsed)
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Clone the properties from the provided node without"...
method_declaration (+51 nodes collapsed)
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @param item The item to inspect\n * @param propTyp"...
method_declaration (+125 nodes collapsed)
method_declaration (+53 nodes collapsed)
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Returns the integer value for the property, or 0 if"...
method_declaration (+54 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+55 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+36 nodes collapsed)
line_comment "// Gets all the property types, in sorted order."
method_declaration (+141 nodes collapsed)
block_comment "/** Can only be called when <tt>getType() == TokenStream.NUM"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Can only be called when <tt>getType() == Token.NUMB"...
method_declaration (+72 nodes collapsed)
block_comment "/** Can only be called when node has String context. */"
method_declaration (+68 nodes collapsed)
block_comment "/**\n * Can only be called for a Token.STRING or Token.NAME"...
method_declaration (+86 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+58 nodes collapsed)
method_declaration (+501 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "toStringTree"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "toStringTreeImpl"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+74 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+139 nodes collapsed)
field_declaration
integral_type
int "int"
variable_declarator
identifier "type"
; ";"
line_comment "// type of the node; Token.NAME for example"
field_declaration
type_identifier "Node"
variable_declarator
identifier "next"
; ";"
line_comment "// next sibling"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "first"
; ";"
line_comment "// first element of a linked list of children"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "last"
; ";"
line_comment "// last element of a linked list of children"
block_comment "/**\n * Linked list of properties. Since vast majority of n"...
field_declaration
modifiers
private "private"
type_identifier "PropListItem"
variable_declarator
identifier "propListHead"
; ";"
block_comment "/**\n * COLUMN_BITS represents how many of the lower-order "...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "COLUMN_BITS"
= "="
decimal_integer_literal "12"
; ";"
block_comment "/**\n * MAX_COLUMN_NUMBER represents the maximum column num"...
field_declaration (+21 nodes collapsed)
block_comment "/**\n * COLUMN_MASK stores a value where bits storing the c"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "COLUMN_MASK"
= "="
identifier "MAX_COLUMN_NUMBER"
; ";"
block_comment "/**\n * Source position of this node. The position is encod"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "sourcePosition"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSType"
variable_declarator
identifier "jsType"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "parent"
; ";"
line_comment "//=========================================================="...
line_comment "// Source position management"
method_declaration (+26 nodes collapsed)
block_comment "/** Sets the source file to a non-extern file of the given n"...
method_declaration (+34 nodes collapsed)
method_declaration (+40 nodes collapsed)
block_comment "/** Returns the source file associated with this input. May "...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * @param inputId\n */"
method_declaration (+26 nodes collapsed)
block_comment "/**\n * @return The Id of the CompilerInput associated with"...
method_declaration (+29 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getSourcePosition"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "sourcePosition"
; ";"
} "}"
method_declaration (+60 nodes collapsed)
method_declaration (+32 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Merges the line number and character number in one "...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Extracts the line number and character number from "...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Extracts the character number and character number "...
method_declaration (+48 nodes collapsed)
line_comment "//=========================================================="...
line_comment "// Iteration"
block_comment "/**\n * <p>Return an iterable object that iterates over thi"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Return an iterable object that iterates over thi"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * @see Node#siblings()\n */"
class_declaration (+260 nodes collapsed)
line_comment "// ========================================================="...
line_comment "// Accessors"
method_declaration
type_identifier "PropListItem"
identifier "getPropListHeadForTesting"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "propListHead"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getParent"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "parent"
; ";"
} "}"
block_comment "/**\n * Gets the ancestor node relative to this.\n *\n * "...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Iterates all of the node's ancestors excluding itse"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Iterator to go up the ancestor tree.\n */"
class_declaration (+187 nodes collapsed)
block_comment "/**\n * Check for one child more efficiently than by iterat"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Check for more than one child more efficiently than"...
method_declaration (+24 nodes collapsed)
method_declaration (+55 nodes collapsed)
line_comment "// Intended for testing and verification only."
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Checks if the subtree under this node is the same a"...
method_declaration (+122 nodes collapsed)
block_comment "/**\n * Compare this node to node2 recursively and return t"...
method_declaration (+161 nodes collapsed)
block_comment "/**\n * Compare this node to node2 recursively and return t"...
method_declaration (+141 nodes collapsed)
block_comment "/** Returns true if this node is equivalent semantically to "...
method_declaration (+29 nodes collapsed)
block_comment "/** Checks equivalence without going into inner functions */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Returns true if this node is equivalent semanticall"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * @param compareJsType Whether to compare the JSTypes"...
method_declaration (+464 nodes collapsed)
block_comment "/**\n * This function takes a set of GETPROP nodes and prod"...
method_declaration (+155 nodes collapsed)
block_comment "/**\n * Returns whether a node corresponds to a simple or a"...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Returns whether a node corresponds to a simple or a"...
method_declaration (+81 nodes collapsed)
line_comment "// ========================================================="...
line_comment "// Mutators"
block_comment "/**\n * Removes this node from its parent. Equivalent to:\n "...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Removes the first child of Node. Equivalent to:\n "...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * @return A Node that is the head of the list of chil"...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * Removes all children from this node and isolates th"...
method_declaration (+79 nodes collapsed)
method_declaration (+118 nodes collapsed)
block_comment "/**\n * @return A detached clone of the Node, specifically "...
method_declaration (+106 nodes collapsed)
block_comment "/**\n * @return A detached clone of the Node and all its ch"...
method_declaration (+141 nodes collapsed)
block_comment "/**\n * Copies source file and name information from the ot"...
line_comment "// TODO(nicksantos): The semantics of this method are ill-de"...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Copies source file and name information from the ot"...
line_comment "// TODO(nicksantos): The semantics of this method are ill-de"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node w"...
method_declaration (+61 nodes collapsed)
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node a"...
method_declaration (+69 nodes collapsed)
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node w"...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Overwrite all the source information in this node a"...
method_declaration (+69 nodes collapsed)
line_comment "//=========================================================="...
line_comment "// Custom annotations"
method_declaration
modifiers
public "public"
type_identifier "JSType"
identifier "getJSType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "jsType"
; ";"
} "}"
method_declaration (+23 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "FileLevelJsDocBuilder"
identifier "getJsDocBuilderForNode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "FileLevelJsDocBuilder"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * An inner class that provides back-door access to th"...
class_declaration (+113 nodes collapsed)
block_comment "/**\n * Get the {@link JSDocInfo} attached to this node.\n "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Sets the {@link JSDocInfo} attached to this node.\n "...
method_declaration (+28 nodes collapsed)
block_comment "/** This node was last changed at {@code time} */"
method_declaration (+25 nodes collapsed)
block_comment "/** Returns the time of the last change for this node */"
method_declaration (+21 nodes collapsed)
block_comment "/**\n * Sets whether this node is a variable length argumen"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this node is a variable length argu"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isVarArgs"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "VAR_ARGS_NAME"
) ")"
; ";"
} "}"
block_comment "/**\n * Sets whether this node is an optional argument node"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this node is an optional argument n"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isOptionalArg"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "OPT_ARG_NAME"
) ")"
; ";"
} "}"
block_comment "/**\n * Sets whether this is a synthetic block that should "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this is a synthetic block that shou"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isSyntheticBlock"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "SYNTHETIC_BLOCK_PROP"
) ")"
; ";"
} "}"
block_comment "/**\n * Sets the ES5 directives on this node.\n */"
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Returns the set of ES5 directives for this node.\n "...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Adds a warning to be suppressed. This is indistingu"...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Sets whether this is a synthetic block that should "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns whether this is a synthetic block that shou"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "wasEmptyNode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "getBooleanProp"
argument_list
( "("
identifier "EMPTY_BLOCK"
) ")"
; ";"
} "}"
line_comment "// There are four values of interest:"
line_comment "// global state changes"
line_comment "// this state changes"
line_comment "// arguments state changes"
line_comment "// whether the call throws an exception"
line_comment "// locality of the result"
line_comment "// We want a value of 0 to mean \"global state changes and"
line_comment "// unknown locality of result\"."
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_GLOBAL_STATE_UNMODIFIED"
= "="
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_THIS_UNMODIFIED"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_ARGUMENTS_UNMODIFIED"
= "="
decimal_integer_literal "4"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_NO_THROWS"
= "="
decimal_integer_literal "8"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_LOCAL_RESULTS"
= "="
decimal_integer_literal "16"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SIDE_EFFECTS_FLAGS_MASK"
= "="
decimal_integer_literal "31"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SIDE_EFFECTS_ALL"
= "="
decimal_integer_literal "0"
; ";"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Marks this function or constructor call's side effe"...
method_declaration (+77 nodes collapsed)
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Returns the side effects flags for this node.\n */"
method_declaration (+21 nodes collapsed)
block_comment "/**\n * A helper class for getting and setting the side-eff"...
class_declaration (+345 nodes collapsed)
block_comment "/**\n * @return Whether the only side-effect is \"modifies t"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @return Whether the only side-effect is \"modifies a"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Returns true if this node is a function or construc"...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Returns true if this node is a function or construc"...
method_declaration (+26 nodes collapsed)
block_comment "/** Returns true if this is a new/call that may mutate its a"...
method_declaration (+28 nodes collapsed)
block_comment "/** Returns true if this is a new/call that may mutate globa"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * returns true if all the flags are set in value.\n "...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * This should only be called for STRING nodes childre"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isQuotedString"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
block_comment "/**\n * This should only be called for STRING nodes childre"...
method_declaration (+24 nodes collapsed)
class_declaration (+160 nodes collapsed)
block_comment "/*** AST type check methods ***/"
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+27 nodes collapsed)
} "}"