class_body
{ "{"
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+21 nodes collapsed)
method_declaration (+111 nodes collapsed)
method_declaration (+410 nodes collapsed)
block_comment "/**\n * Folds 'typeof(foo)' if foo is a literal, e.g.\n * "...
method_declaration
modifiers
private "private"
type_identifier "Node"
identifier "tryFoldTypeof"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "originalTypeofNode"
) ")"
block
{ "{"
expression_statement (+22 nodes collapsed)
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "argumentNode"
= "="
method_invocation
identifier "originalTypeofNode"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
if_statement (+28 nodes collapsed)
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "typeNameString"
= "="
null_literal "null"
; ";"
switch_expression
switch "switch"
parenthesized_expression
( "("
method_invocation
identifier "argumentNode"
. "."
identifier "getType"
argument_list
( "("
) ")"
) ")"
switch_block
{ "{"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "STRING"
: ":"
expression_statement
assignment_expression
identifier "typeNameString"
= "="
string_literal
" "\""
string_fragment "string"
" "\""
; ";"
break_statement
break "break"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "NUMBER"
: ":"
expression_statement
assignment_expression
identifier "typeNameString"
= "="
string_literal
" "\""
string_fragment "number"
" "\""
; ";"
break_statement
break "break"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "TRUE"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "FALSE"
: ":"
expression_statement
assignment_expression
identifier "typeNameString"
= "="
string_literal
" "\""
string_fragment "boolean"
" "\""
; ";"
break_statement
break "break"
; ";"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "NULL"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "OBJECTLIT"
: ":"
switch_block_statement_group
switch_label
case "case"
field_access
identifier "Token"
. "."
identifier "ARRAYLIT"
: ":"
expression_statement
assignment_expression
identifier "typeNameString"
= "="
string_literal
" "\""
string_fragment "object"
" "\""
; ";"
break_statement
break "break"
; ";"
switch_block_statement_group (+47 nodes collapsed)
} "}"
if_statement (+55 nodes collapsed)
return_statement
return "return"
identifier "originalTypeofNode"
; ";"
} "}"
method_declaration (+631 nodes collapsed)
block_comment "/**\n * Try to fold {@code left instanceof right} into {@co"...
method_declaration (+214 nodes collapsed)
method_declaration (+463 nodes collapsed)
block_comment "/**\n * Try to fold a AND/OR node.\n */"
method_declaration (+430 nodes collapsed)
block_comment "/**\n * Expressions such as [foo() + 'a' + 'b'] generate pa"...
method_declaration (+227 nodes collapsed)
block_comment "/**\n * Try to fold an ADD node with constant operands\n *"...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * Try to fold arithmetic binary operators\n */"
method_declaration (+350 nodes collapsed)
method_declaration (+102 nodes collapsed)
block_comment "/**\n * Try to fold arithmetic binary operators\n */"
method_declaration (+352 nodes collapsed)
block_comment "/**\n * Try to fold shift operations\n */"
method_declaration (+410 nodes collapsed)
block_comment "/**\n * Try to fold comparison nodes, e.g ==\n */"
method_declaration (+1495 nodes collapsed)
method_declaration (+62 nodes collapsed)
block_comment "/**\n * Try to evaluate String.indexOf/lastIndexOf:\n * "...
method_declaration (+485 nodes collapsed)
block_comment "/**\n * Try to fold an array join: ['a', 'b', 'c'].join('')"...
method_declaration (+881 nodes collapsed)
block_comment "/**\n * Try to fold array-element. e.g [1, 2, 3][10];\n */"
method_declaration (+295 nodes collapsed)
block_comment "/**\n * Try to fold array-length. e.g [1, 2, 3].length ==> "...
method_declaration (+253 nodes collapsed)
} "}"