class_body
{ "{"
field_declaration
boolean_type "boolean"
variable_declarator
identifier "statementNeedsEnded"
= "="
false "false"
; ";"
field_declaration
boolean_type "boolean"
variable_declarator
identifier "statementStarted"
= "="
false "false"
; ";"
field_declaration
boolean_type "boolean"
variable_declarator
identifier "sawFunction"
= "="
false "false"
; ";"
block_comment "/**\n * Starts the source mapping for the given\n * node a"...
method_declaration
void_type "void"
identifier "startSourceMapping"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "node"
) ")"
block
{ "{"
} "}"
block_comment "/**\n * Finishes the source mapping for the given\n * node"...
method_declaration
void_type "void"
identifier "endSourceMapping"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "node"
) ")"
block
{ "{"
} "}"
block_comment "/**\n * Provides a means of interrupting the CodeGenerator."...
method_declaration
boolean_type "boolean"
identifier "continueProcessing"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
block_comment "/**\n * Retrieve the last character of the last string sent"...
method_declaration
modifiers
abstract "abstract"
integral_type
char "char"
identifier "getLastChar"
formal_parameters
( "("
) ")"
; ";"
method_declaration
void_type "void"
identifier "addIdentifier"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "identifier"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "add"
argument_list
( "("
identifier "identifier"
) ")"
; ";"
} "}"
block_comment "/**\n * Appends a string to the code, keeping track of the "...
method_declaration
modifiers
abstract "abstract"
void_type "void"
identifier "append"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
; ";"
method_declaration
void_type "void"
identifier "appendBlockStart"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment "{"
" "\""
) ")"
; ";"
} "}"
method_declaration
void_type "void"
identifier "appendBlockEnd"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment "}"
" "\""
) ")"
; ";"
} "}"
method_declaration
void_type "void"
identifier "startNewLine"
formal_parameters
( "("
) ")"
block
{ "{"
} "}"
method_declaration
void_type "void"
identifier "maybeLineBreak"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "maybeCutLine"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration
void_type "void"
identifier "maybeCutLine"
formal_parameters
( "("
) ")"
block
{ "{"
} "}"
method_declaration
void_type "void"
identifier "endLine"
formal_parameters
( "("
) ")"
block
{ "{"
} "}"
method_declaration
void_type "void"
identifier "notePreferredLineBreak"
formal_parameters
( "("
) ")"
block
{ "{"
} "}"
method_declaration (+56 nodes collapsed)
method_declaration
void_type "void"
identifier "endBlock"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "endBlock"
argument_list
( "("
false "false"
) ")"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Indicates the end of a statement and a ';' may need"...
method_declaration
void_type "void"
identifier "endStatement"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "endStatement"
argument_list
( "("
false "false"
) ")"
; ";"
} "}"
method_declaration (+61 nodes collapsed)
block_comment "/**\n * This is to be called when we're in a statement. If "...
method_declaration (+56 nodes collapsed)
method_declaration
void_type "void"
identifier "endFunction"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "endFunction"
argument_list
( "("
false "false"
) ")"
; ";"
} "}"
method_declaration (+34 nodes collapsed)
method_declaration
void_type "void"
identifier "beginCaseBody"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "append"
argument_list
( "("
string_literal
" "\""
string_fragment ":"
" "\""
) ")"
; ";"
} "}"
method_declaration
void_type "void"
identifier "endCaseBody"
formal_parameters
( "("
) ")"
block
{ "{"
} "}"
method_declaration (+150 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+188 nodes collapsed)
method_declaration
void_type "void"
identifier "addNumber"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "x"
) ")"
block
{ "{"
line_comment "// This is not pretty printing. This is to prevent misparsin"...
line_comment "// x--4 (which is a syntax error)."
local_variable_declaration
integral_type
char "char"
variable_declarator
identifier "prev"
= "="
method_invocation
identifier "getLastChar"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "negativeZero"
= "="
method_invocation
identifier "isNegativeZero"
argument_list
( "("
identifier "x"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression any 1:2
identifier "x"
< "<"
decimal_integer_literal "0"
&& "&&"
binary_expression
identifier "prev"
== "=="
character_literal "'-'"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "add"
argument_list
( "("
string_literal
" "\""
string_fragment " "
" "\""
) ")"
; ";"
} "}"
if_statement (+192 nodes collapsed)
} "}"
method_declaration (+39 nodes collapsed)
method_declaration (+41 nodes collapsed)
block_comment "/**\n * If the body of a for loop or the then clause of an "...
method_declaration
boolean_type "boolean"
identifier "shouldPreserveExtraBlocks"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
block_comment "/**\n * @return Whether the a line break can be added after"...
method_declaration
boolean_type "boolean"
identifier "breakAfterBlockFor"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
, ","
formal_parameter
boolean_type "boolean"
identifier "statementContext"
) ")"
block
{ "{"
return_statement
return "return"
identifier "statementContext"
; ";"
} "}"
block_comment "/** Called when we're at the end of a file. */"
method_declaration
void_type "void"
identifier "endFile"
formal_parameters
( "("
) ")"
block
{ "{"
} "}"
} "}"