class_body
{ "{"
field_declaration
modifiers
final "final"
static "static"
type_identifier "String"
variable_declarator
identifier "JSC_PROPERTY_NAME_FN"
= "="
string_literal
" "\""
string_fragment "JSCompiler_renameProperty"
" "\""
; ";"
line_comment "// TODO(user): Eliminate this class and make all of the stat"...
line_comment "// instance methods of com.google.javascript.rhino.Node."
block_comment "/** the set of builtin constructors that don't have side eff"...
field_declaration (+62 nodes collapsed)
line_comment "// Utility class; do not instantiate."
constructor_declaration
modifiers
private "private"
identifier "NodeUtil"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * Gets the boolean value of a node that represents a "...
method_declaration (+310 nodes collapsed)
block_comment "/**\n * Gets the boolean value of a node that represents a "...
method_declaration (+260 nodes collapsed)
block_comment "/**\n * Gets the value of a node as a String, or null if it"...
method_declaration (+261 nodes collapsed)
block_comment "/**\n * Gets the value of a node as a Number, or null if it"...
method_declaration (+201 nodes collapsed)
block_comment "/**\n * Gets the function's name. This method recognizes fi"...
method_declaration (+136 nodes collapsed)
block_comment "/**\n * Gets the function's name. This method recognizes th"...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Returns true if this is an immutable value.\n */"
method_declaration (+171 nodes collapsed)
block_comment "/**\n * Returns true if this is a literal value. We define "...
method_declaration (+224 nodes collapsed)
block_comment "/**\n * Determines whether the given value may be assigned "...
method_declaration (+363 nodes collapsed)
block_comment "/**\n * Returns whether this a BLOCK node with no children."...
method_declaration (+103 nodes collapsed)
method_declaration (+29 nodes collapsed)
block_comment "/**\n * A \"simple\" operator is one whose children are expre"...
method_declaration (+268 nodes collapsed)
block_comment "/**\n * Creates an EXPR_RESULT.\n *\n * @param child The "...
method_declaration (+44 nodes collapsed)
block_comment "/**\n * Returns true if the node may create new mutable sta"...
method_declaration (+25 nodes collapsed)
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Returns true if the node which may have side effect"...
method_declaration (+25 nodes collapsed)
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Returns true if some node in n's subtree changes ap"...
method_declaration (+764 nodes collapsed)
block_comment "/**\n * Do calls to this constructor have side effects?\n "...
method_declaration (+25 nodes collapsed)
method_declaration (+145 nodes collapsed)
line_comment "// A list of built-in object creation or primitive type cast"...
line_comment "// can also be called as constructors but lack side-effects."
line_comment "// TODO(johnlenz): consider adding an extern annotation for "...
field_declaration (+56 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+41 nodes collapsed)
block_comment "/**\n * Returns true if calls to this function have side ef"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns true if calls to this function have side ef"...
method_declaration (+514 nodes collapsed)
block_comment "/**\n * @return Whether the call has a local result.\n */"
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Returns true if the current node's type implies sid"...
method_declaration (+25 nodes collapsed)
method_declaration (+156 nodes collapsed)
block_comment "/**\n * @return Whether the tree can be affected by side-ef"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * @param knownConstants A set of names known to be co"...
method_declaration (+208 nodes collapsed)
block_comment "/*\n * 0 comma ,\n * 1 assignment = += -= *= /= %= <<= >"...
method_declaration (+656 nodes collapsed)
block_comment "/**\n * Returns true if the operator is associative.\n * e"...
method_declaration (+76 nodes collapsed)
block_comment "/**\n * Returns true if the operator is commutative.\n * e"...
method_declaration (+60 nodes collapsed)
method_declaration (+133 nodes collapsed)
method_declaration (+208 nodes collapsed)
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Determines if the given node contains a function st"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Returns true if the shallow scope contains referenc"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Is this a GETPROP or GETELEM node?\n */"
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Is this a GETPROP node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this a NAME node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this a NEW node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this a VAR node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this node the name of a variable being declared?"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * For an assignment or variable declaration get the a"...
method_declaration (+111 nodes collapsed)
block_comment "/**\n * Is this a STRING node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this node an assignment expression statement?\n "...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * Is this an ASSIGN node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this node a call expression statement?\n *\n *"...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * @return Whether the node represents a FOR-IN loop.\n"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Determines whether the given node is a FOR, DO, or "...
method_declaration (+65 nodes collapsed)
block_comment "/**\n * @param n The node to inspect.\n * @return If the n"...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * @return Whether the specified node has a loop paren"...
method_declaration (+74 nodes collapsed)
block_comment "/**\n * Determines whether the given node is a FOR, DO, WHI"...
method_declaration (+129 nodes collapsed)
block_comment "/**\n * Determines whether the given node is code node for "...
method_declaration (+238 nodes collapsed)
block_comment "/**\n * Gets the condition of an ON_TRUE / ON_FALSE CFG edg"...
method_declaration (+170 nodes collapsed)
block_comment "/**\n * @return Whether the node is of a type that contain "...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * @return Whether the node is used as a statement.\n "...
method_declaration (+94 nodes collapsed)
block_comment "/** Whether the node is part of a switch statement. */"
method_declaration (+45 nodes collapsed)
block_comment "/**\n * @return Whether the name is a reference to a variab"...
method_declaration (+40 nodes collapsed)
block_comment "/** @return Whether the node is a label name. */"
method_declaration (+39 nodes collapsed)
block_comment "/** Whether the child node is the FINALLY block of a try. */"
method_declaration (+58 nodes collapsed)
block_comment "/** Safely remove children while maintaining a valid node st"...
method_declaration (+335 nodes collapsed)
block_comment "/**\n * Merge a block with its parent block.\n * @return W"...
method_declaration (+140 nodes collapsed)
block_comment "/**\n * Is this a CALL node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * @param node A node\n * @return Whether the call is"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Is this a FUNCTION node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Return a BLOCK node for the given FUNCTION node.\n "...
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Is this a THIS node?\n */"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Is this node or any of its children a CALL?\n */"
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Is this node a function declaration? A function dec"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Is this node a hoisted function declaration? A func"...
method_declaration (+74 nodes collapsed)
block_comment "/**\n * Is a FUNCTION node an function expression? An funct"...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Determines if a node is a function expression that "...
method_declaration (+37 nodes collapsed)
block_comment "/**\n * Determines if a function takes a variable number of"...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * @return Whether node is a call to methodName.\n * "...
method_declaration (+137 nodes collapsed)
block_comment "/**\n * @return Whether the callNode represents an expressi"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * @return Whether the callNode represents an expressi"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * @return Whether the callNode represents an expressi"...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * @return Whether the callNode represents an expressi"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Determines whether this node is strictly on the lef"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Determines whether a node represents an object lite"...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Determines whether a node represents an object lite"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Converts an operator's token value (see {@link Toke"...
method_declaration (+647 nodes collapsed)
block_comment "/**\n * Converts an operator's token value (see {@link Toke"...
method_declaration (+75 nodes collapsed)
block_comment "/**\n * @return true if n or any of its children are of the"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * @return true if n or any of its children are of the"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Given a node tree, finds all the VAR declarations i"...
method_declaration (+148 nodes collapsed)
block_comment "/**\n * Copy any annotations that follow a named value.\n "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * Gets a Node at the top of the current scope where w"...
method_declaration (+204 nodes collapsed)
block_comment "/** Creates function name(params_0, ..., params_n) { body }."...
method_declaration (+149 nodes collapsed)
block_comment "/**\n * Creates a node representing a qualified name.\n *\n"...
method_declaration (+263 nodes collapsed)
block_comment "/**\n * Creates a node representing a qualified name, copyi"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Gets the root node of a qualified name. Must be eit"...
method_declaration (+98 nodes collapsed)
block_comment "/**\n * Sets the debug information (source file info and or"...
method_declaration (+47 nodes collapsed)
method_declaration (+87 nodes collapsed)
block_comment "/**\n * Creates a new node representing an *existing* name,"...
method_declaration (+86 nodes collapsed)
block_comment "/**\n * Creates a new node representing an *existing* name,"...
method_declaration (+61 nodes collapsed)
block_comment "/** Test if all characters in the string are in the Basic La"...
method_declaration (+94 nodes collapsed)
block_comment "/**\n * Determines whether the given name can appear on the"...
method_declaration (+51 nodes collapsed)
class_declaration (+153 nodes collapsed)
block_comment "/**\n * Retrieves vars declared in the current node tree, e"...
method_declaration (+62 nodes collapsed)
block_comment "/**\n * @return {@code true} if the node an assignment to a"...
method_declaration (+55 nodes collapsed)
method_declaration (+70 nodes collapsed)
block_comment "/**\n * @return The class name part of a qualified prototyp"...
method_declaration (+96 nodes collapsed)
block_comment "/**\n * @return The string property name part of a qualifie"...
method_declaration (+79 nodes collapsed)
block_comment "/**\n * Create a node for an empty result expression:\n * "...
method_declaration (+66 nodes collapsed)
block_comment "/**\n * Create a VAR node containing the given name and ini"...
method_declaration (+117 nodes collapsed)
block_comment "/**\n * A predicate for matching name nodes with the specif"...
class_declaration (+91 nodes collapsed)
block_comment "/**\n * A predicate for matching nodes with the specified t"...
class_declaration (+73 nodes collapsed)
block_comment "/**\n * A predicate for matching var or function declaratio"...
class_declaration (+55 nodes collapsed)
block_comment "/**\n * A predicate for matching anything except function n"...
class_declaration (+42 nodes collapsed)
block_comment "/**\n * A predicate for matching statements without exiting"...
class_declaration (+98 nodes collapsed)
block_comment "/**\n * Finds the number of times a type is referenced with"...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Whether a simple name is referenced within the node"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * Whether a simple name is referenced within the node"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * Finds the number of times a simple name is referenc"...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * @return Whether the predicate is true for the node "...
method_declaration (+135 nodes collapsed)
block_comment "/**\n * @return The number of times the the predicate is tr"...
method_declaration (+132 nodes collapsed)
block_comment "/**\n * Interface for use with the visit method.\n * @see "...
interface_declaration
modifiers
static "static"
interface "interface"
identifier "Visitor"
interface_body
{ "{"
method_declaration
void_type "void"
identifier "visit"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "node"
) ")"
; ";"
} "}"
block_comment "/**\n * A pre-order traversal, calling Vistor.visit for eac"...
method_declaration (+100 nodes collapsed)
block_comment "/**\n * A post-order traversal, calling Vistor.visit for ea"...
method_declaration (+100 nodes collapsed)
block_comment "/**\n * @return Whether a TRY node has a finally block.\n "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * @return The BLOCK node containing the CATCH node (i"...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * @return Whether BLOCK (from a TRY node) contains a "...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * @param fnNode The function.\n * @return The Node"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Returns true if a name node represents a constant v"...
method_declaration (+28 nodes collapsed)
block_comment "/** Whether the given name is constant by coding convention."...
method_declaration (+122 nodes collapsed)
block_comment "/**\n * @param nameNode A name node\n * @return The JSDocI"...
method_declaration (+143 nodes collapsed)
block_comment "/**\n * Get the JSDocInfo for a function.\n */"
method_declaration (+164 nodes collapsed)
block_comment "/**\n * @param n The node.\n * @return The source name pro"...
method_declaration (+75 nodes collapsed)
block_comment "/**\n * A new CALL node with the \"FREE_CALL\" set based on c"...
method_declaration (+90 nodes collapsed)
block_comment "/**\n * @return Whether the node is known to be a value tha"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * @param locals A predicate to apply to unknown local"...
method_declaration
modifiers
static "static"
boolean_type "boolean"
identifier "evaluatesToLocalValue"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "value"
, ","
formal_parameter
generic_type
type_identifier "Predicate"
type_arguments
< "<"
type_identifier "Node"
> ">"
identifier "locals"
) ")"
block
{ "{"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
identifier "value"
. "."
identifier "getType"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
switch_block_statement_group (+57 nodes collapsed)
switch_block_statement_group (+25 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "AND"
: ":"
switch_block_statement_group (+41 nodes collapsed)
switch_block_statement_group (+47 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "INC"
: ":"
switch_block_statement_group (+52 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "THIS"
: ":"
return_statement
return "return"
method_invocation
identifier "locals"
. "."
identifier "apply"
argument_list
( "("
identifier "value"
) ")"
; ";"
switch_block_statement_group (+27 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "GETELEM"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "GETPROP"
: ":"
line_comment "// There is no information about the locality of object prop"...
return_statement
return "return"
method_invocation
identifier "locals"
. "."
identifier "apply"
argument_list
( "("
identifier "value"
) ")"
; ";"
switch_block_statement_group (+35 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "NEW"
: ":"
line_comment "// TODO(nicksantos): This needs to be changed so that it"
line_comment "// returns true iff we're sure the value was never aliased f"...
line_comment "// the constructor (similar to callHasLocalResult)"
return_statement
return "return"
true "true"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "FUNCTION"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "REGEXP"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "ARRAYLIT"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "OBJECTLIT"
: ":"
line_comment "// Literals objects with non-literal children are allowed."
return_statement
return "return"
true "true"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "IN"
: ":"
line_comment "// TODO(johnlenz): should IN operator be included in #isSimp"...
return_statement
return "return"
true "true"
; ";"
switch_block_statement_group (+73 nodes collapsed)
} "}"
} "}"
block_comment "/**\n * Given the first sibling, this returns the nth\n * "...
method_declaration (+66 nodes collapsed)
block_comment "/**\n * Given the function, this returns the nth\n * argum"...
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Given the new or call, this returns the nth\n * ar"...
method_declaration (+57 nodes collapsed)
method_declaration (+87 nodes collapsed)
} "}"