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–1355 unchanged (1355 lines)
1356 CodePrinter.Builder builder = new CodePrinter.Builder(n);
1357 builder.setPrettyPrint(options.prettyPrint);
1358 builder.setLineBreak(options.lineBreak);
1359 builder.setSourceMap(sourceMap);
1360 builder.setSourceMapDetailLevel(options.sourceMapDetailLevel);
1361
1362 Charset charset = options.outputCharset;
1363 builder.setOutputCharset(charset);
1364
1365 return builder.build();
1366 }
1367
1368 /**
…lines 1369–1840 unchanged (472 lines)

After

…lines 1–1355 unchanged (1355 lines)
1356 CodePrinter.Builder builder = new CodePrinter.Builder(n);
1357 builder.setPrettyPrint(options.prettyPrint);
1358 builder.setLineBreak(options.lineBreak);
1359 builder.setSourceMap(sourceMap);
1360 builder.setSourceMapDetailLevel(options.sourceMapDetailLevel);
1361
1362 Charset charset = options.outputCharset != null ?
1363 Charset.forName(options.outputCharset) : null;
1364 builder.setOutputCharset(charset);
1365
1366 return builder.build();
1367 }
1368
1369 /**
…lines 1370–1841 unchanged (472 lines)

Before

program
block_comment "/*\n * Copyright 2004 Google Inc.\n *\n * Licensed under the Ap"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
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 "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Supplier"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Maps"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CompilerOptions"
. "."
identifier "DevMode"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CompilerOptions"
. "."
identifier "TracerMode"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "parsing"
. "."
identifier "Config"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "parsing"
. "."
identifier "ParserRunner"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "JSDocInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Token"
; ";"
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 "JSTypeRegistry"
; ";"
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 "PrintStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "charset"
. "."
identifier "Charset"
; ";"
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 "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "concurrent"
. "."
identifier "Callable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Level"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Logger"
; ";"
block_comment "/**\n * Compiler (and the other classes in this package) does"...
class_declaration
modifiers
public "public"
class "class"
identifier "Compiler"
superclass
extends "extends"
type_identifier "AbstractCompiler"
class_body
{ "{"
field_declaration
type_identifier "CompilerOptions"
variable_declarator
identifier "options"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "PassConfig"
variable_declarator
identifier "passes"
= "="
null_literal "null"
; ";"
line_comment "// The externs inputs"
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "CompilerInput"
> ">"
variable_declarator
identifier "externs"
; ";"
line_comment "// The JS source modules"
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "JSModule"
> ">"
variable_declarator
identifier "modules"
; ";"
line_comment "// The graph of the JS source modules. Must be null if there"...
line_comment "// 2 modules, because we use this as a signal for which pass"...
field_declaration
modifiers
private "private"
type_identifier "JSModuleGraph"
variable_declarator
identifier "moduleGraph"
; ";"
line_comment "// The JS source inputs"
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "CompilerInput"
> ">"
variable_declarator
identifier "inputs"
; ";"
line_comment "// error manager to which error management is delegated"
field_declaration
modifiers
private "private"
type_identifier "ErrorManager"
variable_declarator
identifier "errorManager"
; ";"
line_comment "// Parse tree root nodes"
field_declaration
type_identifier "Node"
variable_declarator
identifier "externsRoot"
; ";"
field_declaration
type_identifier "Node"
variable_declarator
identifier "jsRoot"
; ";"
field_declaration
type_identifier "Node"
variable_declarator
identifier "externAndJsRoot"
; ";"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "CompilerInput"
> ">"
variable_declarator
identifier "inputsByName"
; ";"
block_comment "/** The source code map */"
field_declaration
modifiers
private "private"
type_identifier "SourceMap"
variable_declarator
identifier "sourceMap"
; ";"
block_comment "/** The externs created from the exports. */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "externExports"
= "="
null_literal "null"
; ";"
block_comment "/**\n * Ids for function inlining so that each declared nam"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "uniqueNameId"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Whether the optional \"normalization\" pass has been "...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "normalized"
= "="
false "false"
; ";"
block_comment "/** Whether to use threads. */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "useThreads"
= "="
true "true"
; ";"
block_comment "/**\n * Whether to assume there are references to the RegEx"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "hasRegExpGlobalReferences"
= "="
true "true"
; ";"
block_comment "/** The function information map */"
field_declaration
modifiers
private "private"
type_identifier "FunctionInformationMap"
variable_declarator
identifier "functionInformationMap"
; ";"
block_comment "/** Debugging information */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "StringBuilder"
variable_declarator
identifier "debugLog"
= "="
object_creation_expression
new "new"
type_identifier "StringBuilder"
argument_list
( "("
) ")"
; ";"
block_comment "/** Detects Google-specific coding conventions. */"
field_declaration
type_identifier "CodingConvention"
variable_declarator
identifier "defaultCodingConvention"
= "="
object_creation_expression
new "new"
type_identifier "GoogleCodingConvention"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "typeRegistry"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Config"
variable_declarator
identifier "parserConfig"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "ReverseAbstractInterpreter"
variable_declarator
identifier "abstractInterpreter"
; ";"
field_declaration
modifiers
private "private"
type_identifier "TypeValidator"
variable_declarator
identifier "typeValidator"
; ";"
field_declaration
modifiers
public "public"
type_identifier "PerformanceTracker"
variable_declarator
identifier "tracker"
; ";"
line_comment "// The oldErrorReporter exists so we can get errors from the"...
field_declaration (+29 nodes collapsed)
line_comment "// This error reporter gets the messages from the current Rh"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "ErrorReporter"
variable_declarator
identifier "defaultErrorReporter"
= "="
method_invocation
identifier "RhinoErrorReporter"
. "."
identifier "forNewRhino"
argument_list
( "("
this "this"
) ")"
; ";"
block_comment "/** Error strings used for reporting JSErrors */"
field_declaration (+26 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "COMPILER_STACK_SIZE"
= "="
decimal_integer_literal "1048576L"
; ";"
block_comment "/**\n * Logger for the whole com.google.javascript.jscomp d"...
field_declaration (+21 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "PrintStream"
variable_declarator
identifier "outStream"
; ";"
block_comment "/**\n * Creates a Compiler that reports errors and warnings"...
constructor_declaration (+21 nodes collapsed)
block_comment "/**\n * Creates n Compiler that reports errors and warnings"...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Creates a Compiler that uses a custom error manager"...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Sets the error manager.\n *\n * @param errorManag"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Creates a message formatter instance corresponding "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Initialize the compiler options. Only necessary if "...
method_declaration (+111 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+88 nodes collapsed)
field_declaration (+31 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+224 nodes collapsed)
block_comment "/**\n * Do any initialization that is dependent on the comp"...
method_declaration (+38 nodes collapsed)
method_declaration (+79 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration (+26 nodes collapsed)
block_comment "/**\n * Verifies that at least one module has been provided"...
method_declaration (+121 nodes collapsed)
block_comment "/**\n * Fill any empty modules with a place holder file. It"...
method_declaration (+91 nodes collapsed)
block_comment "/**\n * Rebuilds the internal list of inputs by iterating o"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Builds a single list of all module inputs. Verifies"...
method_declaration (+133 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
block_comment "/**\n * Creates a map to make looking up an input by name f"...
method_declaration (+177 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+48 nodes collapsed)
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Compiles a list of inputs.\n */"
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Compiles a list of inputs.\n */"
method_declaration (+134 nodes collapsed)
block_comment "/**\n * Compiles a list of modules.\n */"
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Compiles a list of modules.\n */"
method_declaration (+134 nodes collapsed)
method_declaration (+62 nodes collapsed)
block_comment "/**\n * Disable threads. This is for clients that run on Ap"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "disableThreads"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "useThreads"
= "="
false "false"
; ";"
} "}"
method_declaration (+340 nodes collapsed)
method_declaration (+209 nodes collapsed)
method_declaration
modifiers
public "public"
void_type "void"
identifier "parse"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "parseInputs"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Create the passes object. Clients should use setPas"...
method_declaration
type_identifier "PassConfig"
identifier "createPassConfigInternal"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "DefaultPassConfig"
argument_list
( "("
identifier "options"
) ")"
; ";"
} "}"
block_comment "/**\n * @param passes The PassConfig to use with this Compi"...
method_declaration (+66 nodes collapsed)
block_comment "/**\n * Carry out any special checks or procedures that nee"...
method_declaration
boolean_type "boolean"
identifier "precheck"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+247 nodes collapsed)
method_declaration (+75 nodes collapsed)
method_declaration (+24 nodes collapsed)
field_declaration (+51 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Removes try/catch/finally statements for easier deb"...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * Strips code for smaller compiled code. This is usef"...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * Runs custom passes that are designated to run at a "...
method_declaration (+96 nodes collapsed)
field_declaration
modifiers
private "private"
type_identifier "Tracer"
variable_declarator
identifier "currentTracer"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "currentPassName"
= "="
null_literal "null"
; ";"
block_comment "/**\n * Marks the beginning of a pass.\n */"
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Marks the end of a pass.\n */"
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Returns a new tracer for the given pass name.\n */"
method_declaration (+84 nodes collapsed)
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Returns the result of the compilation.\n */"
method_declaration (+90 nodes collapsed)
block_comment "/**\n * Returns an array constructed from errors + temporar"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the array of errors (never null).\n */"
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns the array of warnings (never null).\n */"
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns the root node of the AST, which includes bo"...
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getRoot"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "externAndJsRoot"
; ";"
} "}"
block_comment "/**\n * Creates a new id for making unique names.\n */"
method_declaration
modifiers
private "private"
integral_type
int "int"
identifier "nextUniqueNameId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
update_expression
identifier "uniqueNameId"
++ "++"
; ";"
} "}"
block_comment "/**\n * Resets the unique name id counter\n */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "VisibleForTesting"
void_type "void"
identifier "resetUniqueNameId"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "uniqueNameId"
= "="
decimal_integer_literal "0"
; ";"
} "}"
method_declaration (+72 nodes collapsed)
block_comment "/**\n * Set if the normalization pass has been done.\n * N"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "setNormalized"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "normalized"
= "="
true "true"
; ";"
} "}"
block_comment "/**\n * Set once unnormalizing passes have been start.\n *"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "setUnnormalized"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "normalized"
= "="
false "false"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "isNormalized"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "normalized"
; ";"
} "}"
method_declaration (+66 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Inputs"
line_comment "//----------------------------------------------------------"...
line_comment "// TODO(nicksantos): Decide which parts of these belong in a"...
line_comment "// interface, and which ones should always be injected."
method_declaration (+28 nodes collapsed)
method_declaration (+112 nodes collapsed)
block_comment "/** Add a source input dynamically. Intended for incremental"...
method_declaration (+75 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "JSModuleGraph"
identifier "getModuleGraph"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "moduleGraph"
; ";"
} "}"
method_declaration (+47 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+106 nodes collapsed)
method_declaration (+41 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Parsing"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * Parses the externs and main inputs.\n *\n * @retu"...
method_declaration (+825 nodes collapsed)
method_declaration (+58 nodes collapsed)
method_declaration (+70 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+45 nodes collapsed)
method_declaration (+97 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "ErrorReporter"
identifier "getDefaultErrorReporter"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultErrorReporter"
; ";"
} "}"
line_comment "//----------------------------------------------------------"...
line_comment "// Convert back to source code"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * Converts the main parse tree back to js code.\n */"
method_declaration (+176 nodes collapsed)
block_comment "/**\n * Converts the parse tree for each input back to js c"...
method_declaration (+228 nodes collapsed)
block_comment "/**\n * Converts the parse tree for a module back to js cod"...
method_declaration (+217 nodes collapsed)
block_comment "/**\n * Converts the parse tree for each input in a module "...
method_declaration (+276 nodes collapsed)
block_comment "/**\n * Writes out js code from a root node. If printing in"...
method_declaration (+467 nodes collapsed)
block_comment "/**\n * Generates JavaScript source code for an AST, doesn'"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * Generates JavaScript source code for an AST.\n */"
method_declaration
modifiers
private "private"
type_identifier "String"
identifier "toSource"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
, ","
formal_parameter
type_identifier "SourceMap"
identifier "sourceMap"
) ")"
block
{ "{"
local_variable_declaration
scoped_type_identifier
type_identifier "CodePrinter"
. "."
type_identifier "Builder"
variable_declarator
identifier "builder"
= "="
object_creation_expression
new "new"
scoped_type_identifier
type_identifier "CodePrinter"
. "."
type_identifier "Builder"
argument_list
( "("
identifier "n"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setPrettyPrint"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "prettyPrint"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setLineBreak"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "lineBreak"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setSourceMap"
argument_list
( "("
identifier "sourceMap"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setSourceMapDetailLevel"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "sourceMapDetailLevel"
) ")"
; ";"
local_variable_declaration
type_identifier "Charset"
variable_declarator
identifier "charset"
= "="
field_access
identifier "options"
. "."
identifier "outputCharset"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setOutputCharset"
argument_list
( "("
identifier "charset"
) ")"
; ";"
return_statement
return "return"
method_invocation
identifier "builder"
. "."
identifier "build"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * Stores a buffer of text to which more can be append"...
class_declaration (+348 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Optimizations"
line_comment "//----------------------------------------------------------"...
method_declaration (+114 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "CssRenamingMap"
identifier "getCssRenamingMap"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "options"
. "."
identifier "cssRenamingMap"
; ";"
} "}"
block_comment "/**\n * Reprocesses the current defines over the AST. This"...
method_declaration (+42 nodes collapsed)
method_declaration (+34 nodes collapsed)
block_comment "/** Control Flow Analysis. */"
method_declaration (+88 nodes collapsed)
method_declaration (+58 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+88 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+25 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * All passes should call reportCodeChange() when they"...
method_declaration (+34 nodes collapsed)
method_declaration (+45 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+21 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Error reporting"
line_comment "//----------------------------------------------------------"...
method_declaration (+111 nodes collapsed)
method_declaration (+74 nodes collapsed)
block_comment "/**\n * Report an internal error.\n */"
method_declaration (+88 nodes collapsed)
block_comment "/**\n * Gets the number of errors.\n */"
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the number of warnings.\n */"
method_declaration (+22 nodes collapsed)
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Consults the {@link ErrorManager} to see if we've e"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "hasErrors"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "hasHaltingErrors"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/** Called from the compiler passes, adds debug info */"
method_declaration (+46 nodes collapsed)
method_declaration (+51 nodes collapsed)
method_declaration (+74 nodes collapsed)
method_declaration (+74 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Package-private helpers"
line_comment "//----------------------------------------------------------"...
method_declaration (+141 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "SourceMap"
identifier "getSourceMap"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "sourceMap"
; ";"
} "}"
method_declaration (+26 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration
type_identifier "CompilerOptions"
identifier "getOptions"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "options"
; ";"
} "}"
method_declaration
type_identifier "FunctionInformationMap"
identifier "getFunctionalInformationMap"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "functionInformationMap"
; ";"
} "}"
block_comment "/**\n * Sets the logging level for the com.google.javascrip"...
method_declaration (+25 nodes collapsed)
block_comment "/** Gets the DOT graph of the AST generated at the end of co"...
method_declaration (+82 nodes collapsed)
method_declaration (+43 nodes collapsed)
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Stores the internal compiler state just before opti"...
class_declaration (+107 nodes collapsed)
block_comment "/**\n * Returns the current internal state, excluding the i"...
method_declaration (+109 nodes collapsed)
block_comment "/**\n * Sets the internal state to the capture given. Note"...
method_declaration (+104 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "hasRegExpGlobalReferences"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "hasRegExpGlobalReferences"
; ";"
} "}"
method_declaration (+22 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright 2004 Google Inc.\n *\n * Licensed under the Ap"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
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 "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Supplier"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Maps"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CompilerOptions"
. "."
identifier "DevMode"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "CompilerOptions"
. "."
identifier "TracerMode"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "parsing"
. "."
identifier "Config"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
. "."
identifier "parsing"
. "."
identifier "ParserRunner"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "JSDocInfo"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Token"
; ";"
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 "JSTypeRegistry"
; ";"
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 "PrintStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "charset"
. "."
identifier "Charset"
; ";"
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 "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "concurrent"
. "."
identifier "Callable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Level"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Logger"
; ";"
block_comment "/**\n * Compiler (and the other classes in this package) does"...
class_declaration
modifiers
public "public"
class "class"
identifier "Compiler"
superclass
extends "extends"
type_identifier "AbstractCompiler"
class_body
{ "{"
field_declaration
type_identifier "CompilerOptions"
variable_declarator
identifier "options"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "PassConfig"
variable_declarator
identifier "passes"
= "="
null_literal "null"
; ";"
line_comment "// The externs inputs"
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "CompilerInput"
> ">"
variable_declarator
identifier "externs"
; ";"
line_comment "// The JS source modules"
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "JSModule"
> ">"
variable_declarator
identifier "modules"
; ";"
line_comment "// The graph of the JS source modules. Must be null if there"...
line_comment "// 2 modules, because we use this as a signal for which pass"...
field_declaration
modifiers
private "private"
type_identifier "JSModuleGraph"
variable_declarator
identifier "moduleGraph"
; ";"
line_comment "// The JS source inputs"
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "CompilerInput"
> ">"
variable_declarator
identifier "inputs"
; ";"
line_comment "// error manager to which error management is delegated"
field_declaration
modifiers
private "private"
type_identifier "ErrorManager"
variable_declarator
identifier "errorManager"
; ";"
line_comment "// Parse tree root nodes"
field_declaration
type_identifier "Node"
variable_declarator
identifier "externsRoot"
; ";"
field_declaration
type_identifier "Node"
variable_declarator
identifier "jsRoot"
; ";"
field_declaration
type_identifier "Node"
variable_declarator
identifier "externAndJsRoot"
; ";"
field_declaration
modifiers
private "private"
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "CompilerInput"
> ">"
variable_declarator
identifier "inputsByName"
; ";"
block_comment "/** The source code map */"
field_declaration
modifiers
private "private"
type_identifier "SourceMap"
variable_declarator
identifier "sourceMap"
; ";"
block_comment "/** The externs created from the exports. */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "externExports"
= "="
null_literal "null"
; ";"
block_comment "/**\n * Ids for function inlining so that each declared nam"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "uniqueNameId"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Whether the optional \"normalization\" pass has been "...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "normalized"
= "="
false "false"
; ";"
block_comment "/** Whether to use threads. */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "useThreads"
= "="
true "true"
; ";"
block_comment "/**\n * Whether to assume there are references to the RegEx"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "hasRegExpGlobalReferences"
= "="
true "true"
; ";"
block_comment "/** The function information map */"
field_declaration
modifiers
private "private"
type_identifier "FunctionInformationMap"
variable_declarator
identifier "functionInformationMap"
; ";"
block_comment "/** Debugging information */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "StringBuilder"
variable_declarator
identifier "debugLog"
= "="
object_creation_expression
new "new"
type_identifier "StringBuilder"
argument_list
( "("
) ")"
; ";"
block_comment "/** Detects Google-specific coding conventions. */"
field_declaration
type_identifier "CodingConvention"
variable_declarator
identifier "defaultCodingConvention"
= "="
object_creation_expression
new "new"
type_identifier "GoogleCodingConvention"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "typeRegistry"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Config"
variable_declarator
identifier "parserConfig"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "ReverseAbstractInterpreter"
variable_declarator
identifier "abstractInterpreter"
; ";"
field_declaration
modifiers
private "private"
type_identifier "TypeValidator"
variable_declarator
identifier "typeValidator"
; ";"
field_declaration
modifiers
public "public"
type_identifier "PerformanceTracker"
variable_declarator
identifier "tracker"
; ";"
line_comment "// The oldErrorReporter exists so we can get errors from the"...
field_declaration (+29 nodes collapsed)
line_comment "// This error reporter gets the messages from the current Rh"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "ErrorReporter"
variable_declarator
identifier "defaultErrorReporter"
= "="
method_invocation
identifier "RhinoErrorReporter"
. "."
identifier "forNewRhino"
argument_list
( "("
this "this"
) ")"
; ";"
block_comment "/** Error strings used for reporting JSErrors */"
field_declaration (+26 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "COMPILER_STACK_SIZE"
= "="
decimal_integer_literal "1048576L"
; ";"
block_comment "/**\n * Logger for the whole com.google.javascript.jscomp d"...
field_declaration (+21 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "PrintStream"
variable_declarator
identifier "outStream"
; ";"
block_comment "/**\n * Creates a Compiler that reports errors and warnings"...
constructor_declaration (+21 nodes collapsed)
block_comment "/**\n * Creates n Compiler that reports errors and warnings"...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Creates a Compiler that uses a custom error manager"...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Sets the error manager.\n *\n * @param errorManag"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Creates a message formatter instance corresponding "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Initialize the compiler options. Only necessary if "...
method_declaration (+111 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+88 nodes collapsed)
field_declaration (+31 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Initializes the instance state needed for a compile"...
method_declaration (+224 nodes collapsed)
block_comment "/**\n * Do any initialization that is dependent on the comp"...
method_declaration (+38 nodes collapsed)
method_declaration (+79 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration (+26 nodes collapsed)
block_comment "/**\n * Verifies that at least one module has been provided"...
method_declaration (+121 nodes collapsed)
block_comment "/**\n * Fill any empty modules with a place holder file. It"...
method_declaration (+91 nodes collapsed)
block_comment "/**\n * Rebuilds the internal list of inputs by iterating o"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * Builds a single list of all module inputs. Verifies"...
method_declaration (+133 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
block_comment "/**\n * Creates a map to make looking up an input by name f"...
method_declaration (+177 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+48 nodes collapsed)
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Compiles a list of inputs.\n */"
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Compiles a list of inputs.\n */"
method_declaration (+134 nodes collapsed)
block_comment "/**\n * Compiles a list of modules.\n */"
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Compiles a list of modules.\n */"
method_declaration (+134 nodes collapsed)
method_declaration (+62 nodes collapsed)
block_comment "/**\n * Disable threads. This is for clients that run on Ap"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "disableThreads"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "useThreads"
= "="
false "false"
; ";"
} "}"
method_declaration (+340 nodes collapsed)
method_declaration (+209 nodes collapsed)
method_declaration
modifiers
public "public"
void_type "void"
identifier "parse"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "parseInputs"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Create the passes object. Clients should use setPas"...
method_declaration
type_identifier "PassConfig"
identifier "createPassConfigInternal"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "DefaultPassConfig"
argument_list
( "("
identifier "options"
) ")"
; ";"
} "}"
block_comment "/**\n * @param passes The PassConfig to use with this Compi"...
method_declaration (+66 nodes collapsed)
block_comment "/**\n * Carry out any special checks or procedures that nee"...
method_declaration
boolean_type "boolean"
identifier "precheck"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+247 nodes collapsed)
method_declaration (+75 nodes collapsed)
method_declaration (+24 nodes collapsed)
field_declaration (+51 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Removes try/catch/finally statements for easier deb"...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * Strips code for smaller compiled code. This is usef"...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * Runs custom passes that are designated to run at a "...
method_declaration (+96 nodes collapsed)
field_declaration
modifiers
private "private"
type_identifier "Tracer"
variable_declarator
identifier "currentTracer"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "currentPassName"
= "="
null_literal "null"
; ";"
block_comment "/**\n * Marks the beginning of a pass.\n */"
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Marks the end of a pass.\n */"
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Returns a new tracer for the given pass name.\n */"
method_declaration (+84 nodes collapsed)
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Returns the result of the compilation.\n */"
method_declaration (+90 nodes collapsed)
block_comment "/**\n * Returns an array constructed from errors + temporar"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns the array of errors (never null).\n */"
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns the array of warnings (never null).\n */"
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns the root node of the AST, which includes bo"...
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getRoot"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "externAndJsRoot"
; ";"
} "}"
block_comment "/**\n * Creates a new id for making unique names.\n */"
method_declaration
modifiers
private "private"
integral_type
int "int"
identifier "nextUniqueNameId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
update_expression
identifier "uniqueNameId"
++ "++"
; ";"
} "}"
block_comment "/**\n * Resets the unique name id counter\n */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "VisibleForTesting"
void_type "void"
identifier "resetUniqueNameId"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "uniqueNameId"
= "="
decimal_integer_literal "0"
; ";"
} "}"
method_declaration (+72 nodes collapsed)
block_comment "/**\n * Set if the normalization pass has been done.\n * N"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "setNormalized"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "normalized"
= "="
true "true"
; ";"
} "}"
block_comment "/**\n * Set once unnormalizing passes have been start.\n *"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
void_type "void"
identifier "setUnnormalized"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "normalized"
= "="
false "false"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "isNormalized"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "normalized"
; ";"
} "}"
method_declaration (+66 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Inputs"
line_comment "//----------------------------------------------------------"...
line_comment "// TODO(nicksantos): Decide which parts of these belong in a"...
line_comment "// interface, and which ones should always be injected."
method_declaration (+28 nodes collapsed)
method_declaration (+112 nodes collapsed)
block_comment "/** Add a source input dynamically. Intended for incremental"...
method_declaration (+75 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "JSModuleGraph"
identifier "getModuleGraph"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "moduleGraph"
; ";"
} "}"
method_declaration (+47 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+106 nodes collapsed)
method_declaration (+41 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Parsing"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * Parses the externs and main inputs.\n *\n * @retu"...
method_declaration (+825 nodes collapsed)
method_declaration (+58 nodes collapsed)
method_declaration (+70 nodes collapsed)
method_declaration (+36 nodes collapsed)
method_declaration (+45 nodes collapsed)
method_declaration (+97 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "ErrorReporter"
identifier "getDefaultErrorReporter"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "defaultErrorReporter"
; ";"
} "}"
line_comment "//----------------------------------------------------------"...
line_comment "// Convert back to source code"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * Converts the main parse tree back to js code.\n */"
method_declaration (+176 nodes collapsed)
block_comment "/**\n * Converts the parse tree for each input back to js c"...
method_declaration (+228 nodes collapsed)
block_comment "/**\n * Converts the parse tree for a module back to js cod"...
method_declaration (+217 nodes collapsed)
block_comment "/**\n * Converts the parse tree for each input in a module "...
method_declaration (+276 nodes collapsed)
block_comment "/**\n * Writes out js code from a root node. If printing in"...
method_declaration (+467 nodes collapsed)
block_comment "/**\n * Generates JavaScript source code for an AST, doesn'"...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * Generates JavaScript source code for an AST.\n */"
method_declaration
modifiers
private "private"
type_identifier "String"
identifier "toSource"
formal_parameters
( "("
formal_parameter
type_identifier "Node"
identifier "n"
, ","
formal_parameter
type_identifier "SourceMap"
identifier "sourceMap"
) ")"
block
{ "{"
local_variable_declaration
scoped_type_identifier
type_identifier "CodePrinter"
. "."
type_identifier "Builder"
variable_declarator
identifier "builder"
= "="
object_creation_expression
new "new"
scoped_type_identifier
type_identifier "CodePrinter"
. "."
type_identifier "Builder"
argument_list
( "("
identifier "n"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setPrettyPrint"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "prettyPrint"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setLineBreak"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "lineBreak"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setSourceMap"
argument_list
( "("
identifier "sourceMap"
) ")"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setSourceMapDetailLevel"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "sourceMapDetailLevel"
) ")"
; ";"
local_variable_declaration
type_identifier "Charset"
variable_declarator
identifier "charset"
= "="
ternary_expression
binary_expression
field_access
identifier "options"
. "."
identifier "outputCharset"
!= "!="
null_literal "null"
? "?"
method_invocation
identifier "Charset"
. "."
identifier "forName"
argument_list
( "("
field_access
identifier "options"
. "."
identifier "outputCharset"
) ")"
: ":"
null_literal "null"
; ";"
expression_statement
method_invocation
identifier "builder"
. "."
identifier "setOutputCharset"
argument_list
( "("
identifier "charset"
) ")"
; ";"
return_statement
return "return"
method_invocation
identifier "builder"
. "."
identifier "build"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/**\n * Stores a buffer of text to which more can be append"...
class_declaration (+348 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Optimizations"
line_comment "//----------------------------------------------------------"...
method_declaration (+114 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "CssRenamingMap"
identifier "getCssRenamingMap"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "options"
. "."
identifier "cssRenamingMap"
; ";"
} "}"
block_comment "/**\n * Reprocesses the current defines over the AST. This"...
method_declaration (+42 nodes collapsed)
method_declaration (+34 nodes collapsed)
block_comment "/** Control Flow Analysis. */"
method_declaration (+88 nodes collapsed)
method_declaration (+58 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+88 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+25 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * All passes should call reportCodeChange() when they"...
method_declaration (+34 nodes collapsed)
method_declaration (+45 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+46 nodes collapsed)
method_declaration (+21 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Error reporting"
line_comment "//----------------------------------------------------------"...
method_declaration (+111 nodes collapsed)
method_declaration (+74 nodes collapsed)
block_comment "/**\n * Report an internal error.\n */"
method_declaration (+88 nodes collapsed)
block_comment "/**\n * Gets the number of errors.\n */"
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the number of warnings.\n */"
method_declaration (+22 nodes collapsed)
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Consults the {@link ErrorManager} to see if we've e"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "hasErrors"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "hasHaltingErrors"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/** Called from the compiler passes, adds debug info */"
method_declaration (+46 nodes collapsed)
method_declaration (+51 nodes collapsed)
method_declaration (+74 nodes collapsed)
method_declaration (+74 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// Package-private helpers"
line_comment "//----------------------------------------------------------"...
method_declaration (+141 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "SourceMap"
identifier "getSourceMap"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "sourceMap"
; ";"
} "}"
method_declaration (+26 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration
type_identifier "CompilerOptions"
identifier "getOptions"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "options"
; ";"
} "}"
method_declaration
type_identifier "FunctionInformationMap"
identifier "getFunctionalInformationMap"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "functionInformationMap"
; ";"
} "}"
block_comment "/**\n * Sets the logging level for the com.google.javascrip"...
method_declaration (+25 nodes collapsed)
block_comment "/** Gets the DOT graph of the AST generated at the end of co"...
method_declaration (+82 nodes collapsed)
method_declaration (+43 nodes collapsed)
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Stores the internal compiler state just before opti"...
class_declaration (+107 nodes collapsed)
block_comment "/**\n * Returns the current internal state, excluding the i"...
method_declaration (+109 nodes collapsed)
block_comment "/**\n * Sets the internal state to the capture given. Note"...
method_declaration (+104 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "hasRegExpGlobalReferences"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "hasRegExpGlobalReferences"
; ";"
} "}"
method_declaration (+22 nodes collapsed)
} "}"