block
{ "{"
line_comment "// Just an 'exit'."
if_statement (+48 nodes collapsed)
line_comment "// Just an 'if'."
if_statement (+86 nodes collapsed)
line_comment "// Just a 'try/catch/finally'."
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "n"
. "."
identifier "isTry"
argument_list
( "("
) ")"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "tryBlock"
= "="
method_invocation
identifier "n"
. "."
identifier "getFirstChild"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "tryMinimizeExits"
argument_list
( "("
identifier "tryBlock"
, ","
identifier "exitType"
, ","
identifier "labelName"
) ")"
; ";"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "allCatchNodes"
= "="
method_invocation
identifier "NodeUtil"
. "."
identifier "getCatchBlock"
argument_list
( "("
identifier "n"
) ")"
; ";"
if_statement (+70 nodes collapsed)
block_comment "/* Don't try to minimize the exits of finally blocks, as thi"...
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "NodeUtil"
. "."
identifier "hasFinally"
argument_list
( "("
identifier "n"
) ")"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Node"
variable_declarator
identifier "finallyBlock"
= "="
method_invocation
identifier "n"
. "."
identifier "getLastChild"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "tryMinimizeExits"
argument_list
( "("
identifier "finallyBlock"
, ","
identifier "exitType"
, ","
identifier "labelName"
) ")"
; ";"
} "}"
} "}"
line_comment "// Just a 'label'."
if_statement (+40 nodes collapsed)
line_comment "// TODO(johnlenz): The last case of SWITCH statement?"
line_comment "// The rest assumes a block with at least one child, bail on"...
if_statement (+32 nodes collapsed)
line_comment "// Multiple if-exits can be converted in a single pass."
line_comment "// Convert \"if (blah) break; if (blah2) break; other_stmt;\""...
line_comment "// become \"if (blah); else { if (blah2); else { other_stmt; "...
line_comment "// which will get converted to \"if (!blah && !blah2) { other"...
enhanced_for_statement (+176 nodes collapsed)
line_comment "// Now try to minimize the exits of the last child, if it is"...
line_comment "// look at what has become the last child."
for_statement (+69 nodes collapsed)
} "}"