This mapping has 8 all-to-all groups: every node on one side corresponds to every node on the other, and none is deleted or inserted. Each member carries an all N:M badge; selecting one highlights all of its counterparts, in the tree and in the code view alike.

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–151 unchanged (151 lines)
152 createDefineReplacements(config.define, options);
153
154 options.manageClosureDependencies = config.manageClosureDependencies;
155 options.devMode = config.jscompDevMode;
156 options.setCodingConvention(config.codingConvention);
157 options.setSummaryDetailLevel(config.summaryDetailLevel);
158
159 inputCharset = getInputCharset();
160
161 if (config.jsOutputFile.length() > 0) {
162 options.jsOutputFile = config.jsOutputFile;
163 }
164
…lines 165–511 unchanged (347 lines)
512 B options = createOptions();
513
514 JSModule[] modules = null;
515 Result result;
516
517 setRunOptions(options);
518 if (inputCharset == Charsets.UTF_8) {
519 options.outputCharset = Charsets.US_ASCII;
520 } else {
521 options.outputCharset = inputCharset;
522 }
523
524 boolean writeOutputToFile = !options.jsOutputFile.isEmpty();
525 if (writeOutputToFile) {
526 out = toWriter(options.jsOutputFile, inputCharset.name());
527 }
528
…lines 529–686 unchanged (158 lines)
687 * proxies and firewalls.
688 *
689 * @return Name of the charset to use when writing outputs. Guaranteed to
690 * be a supported charset.
691 * @throws FlagUsageException if flag is not a valid Charset name.
692 */
693
694 protected List<JSSourceFile> createExterns() throws FlagUsageException,
695 IOException {
696 return createExternInputs(config.externs);
697 }
698
699 /**
…lines 700–1457 unchanged (758 lines)

After

…lines 1–152 unchanged (152 lines)
153
154 options.manageClosureDependencies = config.manageClosureDependencies;
155 options.devMode = config.jscompDevMode;
156 options.setCodingConvention(config.codingConvention);
157 options.setSummaryDetailLevel(config.summaryDetailLevel);
158
159 options.outputCharset = getOutputCharset();
160 inputCharset = getInputCharset();
161
162 if (config.jsOutputFile.length() > 0) {
163 options.jsOutputFile = config.jsOutputFile;
164 }
165
…lines 166–512 unchanged (347 lines)
513 B options = createOptions();
514
515 JSModule[] modules = null;
516 Result result;
517
518 setRunOptions(options);
519
520 boolean writeOutputToFile = !options.jsOutputFile.isEmpty();
521 if (writeOutputToFile) {
522 out = toWriter(options.jsOutputFile, inputCharset.name());
523 }
524
525 List<String> jsFiles = config.js;
…lines 526–682 unchanged (157 lines)
683 * proxies and firewalls.
684 *
685 * @return Name of the charset to use when writing outputs. Guaranteed to
686 * be a supported charset.
687 * @throws FlagUsageException if flag is not a valid Charset name.
688 */
689 private String getOutputCharset() throws FlagUsageException {
690 if (!config.charset.isEmpty()) {
691 if (!Charset.isSupported(config.charset)) {
692 throw new FlagUsageException(config.charset +
693 " is not a valid charset name.");
694 }
695 return config.charset;
696 }
697 return "US-ASCII";
698 }
699
700 protected List<JSSourceFile> createExterns() throws FlagUsageException,
701 IOException {
702 return createExternInputs(config.externs);
703 }
704
…lines 705–1463 unchanged (759 lines)

Before

program
block_comment "/*\n * Copyright 2009 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 "Charsets"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Joiner"
; ";"
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 "collect"
. "."
identifier "ImmutableList"
; ";"
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
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 "TokenStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "protobuf"
. "."
identifier "CodedOutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "BufferedWriter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileOutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileWriter"
; ";"
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 "OutputStreamWriter"
; ";"
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 "Writer"
; ";"
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 "ArrayList"
; ";"
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 "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Level"
; ";"
block_comment "/**\n * Implementations of AbstractCommandLineRunner translat"...
class_declaration
modifiers
abstract "abstract"
class "class"
identifier "AbstractCommandLineRunner"
type_parameters
< "<"
type_parameter
type_identifier "A"
type_bound
extends "extends"
type_identifier "Compiler"
, ","
type_parameter
type_identifier "B"
type_bound
extends "extends"
type_identifier "CompilerOptions"
> ">"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CommandLineConfig"
variable_declarator
identifier "config"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Appendable"
variable_declarator
identifier "out"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "PrintStream"
variable_declarator
identifier "err"
; ";"
field_declaration
modifiers
private "private"
type_identifier "A"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
static "static"
type_identifier "Charset"
variable_declarator
identifier "inputCharset"
; ";"
line_comment "// Bookkeeping to measure optimal phase orderings."
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "NUM_RUNS_TO_DETERMINE_OPTIMAL_ORDER"
= "="
decimal_integer_literal "100"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RunTimeStats"
variable_declarator
identifier "runTimeStats"
= "="
object_creation_expression
new "new"
type_identifier "RunTimeStats"
argument_list
( "("
) ")"
; ";"
constructor_declaration (+23 nodes collapsed)
constructor_declaration (+47 nodes collapsed)
block_comment "/**\n * Get the command line config, so that it can be init"...
method_declaration
modifiers
protected "protected"
type_identifier "CommandLineConfig"
identifier "getCommandLineConfig"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "config"
; ";"
} "}"
block_comment "/**\n * Returns the instance of the Compiler to use when {@"...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "A"
identifier "createCompiler"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Returns the instance of the Options to use when {@l"...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "B"
identifier "createOptions"
formal_parameters
( "("
) ")"
; ";"
method_declaration
modifiers
protected "protected"
type_identifier "DiagnosticGroups"
identifier "getDiagnosticGroups"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "DiagnosticGroups"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/** No longer does anything. */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Deprecated"
protected "protected"
void_type "void"
identifier "initOptionsFromFlags"
formal_parameters
( "("
formal_parameter
type_identifier "CompilerOptions"
identifier "options"
) ")"
block
{ "{"
} "}"
block_comment "/**\n * Sets options based on the configurations set flags "...
method_declaration
modifiers
final "final"
protected "protected"
void_type "void"
identifier "setRunOptions"
formal_parameters
( "("
formal_parameter
type_identifier "CompilerOptions"
identifier "options"
) ")"
throws
throws "throws"
type_identifier "FlagUsageException"
, ","
type_identifier "IOException"
block
{ "{"
local_variable_declaration
type_identifier "DiagnosticGroups"
variable_declarator
identifier "diagnosticGroups"
= "="
method_invocation
identifier "getDiagnosticGroups"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "diagnosticGroups"
. "."
identifier "setWarningLevels"
argument_list
( "("
identifier "options"
, ","
field_access
identifier "config"
. "."
identifier "jscompError"
, ","
field_access
identifier "CheckLevel"
. "."
identifier "ERROR"
) ")"
; ";"
expression_statement
method_invocation
identifier "diagnosticGroups"
. "."
identifier "setWarningLevels"
argument_list
( "("
identifier "options"
, ","
field_access
identifier "config"
. "."
identifier "jscompWarning"
, ","
field_access
identifier "CheckLevel"
. "."
identifier "WARNING"
) ")"
; ";"
expression_statement
method_invocation
identifier "diagnosticGroups"
. "."
identifier "setWarningLevels"
argument_list
( "("
identifier "options"
, ","
field_access
identifier "config"
. "."
identifier "jscompOff"
, ","
field_access
identifier "CheckLevel"
. "."
identifier "OFF"
) ")"
; ";"
expression_statement
method_invocation
identifier "createDefineReplacements"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "define"
, ","
identifier "options"
) ")"
; ";"
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "manageClosureDependencies"
= "="
field_access
identifier "config"
. "."
identifier "manageClosureDependencies"
; ";"
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "devMode"
= "="
field_access
identifier "config"
. "."
identifier "jscompDevMode"
; ";"
expression_statement
method_invocation
identifier "options"
. "."
identifier "setCodingConvention"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "codingConvention"
) ")"
; ";"
expression_statement
method_invocation
identifier "options"
. "."
identifier "setSummaryDetailLevel"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "summaryDetailLevel"
) ")"
; ";"
expression_statement
assignment_expression
identifier "inputCharset"
= "="
method_invocation
identifier "getInputCharset"
argument_list
( "("
) ")"
; ";"
if_statement (+33 nodes collapsed)
if_statement (+33 nodes collapsed)
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "sourceMapDetailLevel"
= "="
field_access
identifier "config"
. "."
identifier "sourceMapDetailLevel"
; ";"
if_statement (+48 nodes collapsed)
if_statement (+48 nodes collapsed)
} "}"
method_declaration
modifiers
final "final"
protected "protected"
type_identifier "A"
identifier "getCompiler"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "compiler"
; ";"
} "}"
block_comment "/**\n * Runs the Compiler and calls exit() with the exit st"...
method_declaration (+151 nodes collapsed)
block_comment "/**\n * Exits the current process. Prints out any \"process\""...
method_declaration (+127 nodes collapsed)
block_comment "/**\n * Returns the PrintStream for writing errors associat"...
method_declaration
modifiers
protected "protected"
type_identifier "PrintStream"
identifier "getErrorPrintStream"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "err"
; ";"
} "}"
block_comment "/**\n * An exception thrown when command-line flags are use"...
class_declaration (+42 nodes collapsed)
block_comment "/**\n * Creates inputs from a list of files.\n *\n * @par"...
method_declaration (+213 nodes collapsed)
block_comment "/**\n * Creates js source code inputs from a list of files."...
method_declaration (+110 nodes collapsed)
block_comment "/**\n * Creates js extern inputs from a list of files.\n *"...
method_declaration (+119 nodes collapsed)
block_comment "/**\n * Creates module objects from a list of module specif"...
method_declaration (+724 nodes collapsed)
block_comment "/**\n * Parses module wrapper specifications.\n *\n * @pa"...
method_declaration (+302 nodes collapsed)
block_comment "/**\n * Writes code to an output stream, optionally wrappin"...
method_declaration (+248 nodes collapsed)
block_comment "/**\n * Creates any directories necessary to write a file t"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * Parses command-line arguments and runs the compiler"...
method_declaration
modifiers
protected "protected"
integral_type
int "int"
identifier "doRun"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "FlagUsageException"
, ","
type_identifier "IOException"
block
{ "{"
expression_statement
method_invocation
identifier "Compiler"
. "."
identifier "setLoggingLevel"
argument_list
( "("
method_invocation
identifier "Level"
. "."
identifier "parse"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "loggingLevel"
) ")"
) ")"
; ";"
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "JSSourceFile"
> ">"
variable_declarator
identifier "externsList"
= "="
method_invocation
identifier "createExterns"
argument_list
( "("
) ")"
; ";"
local_variable_declaration (+23 nodes collapsed)
expression_statement
method_invocation
identifier "externsList"
. "."
identifier "toArray"
argument_list
( "("
identifier "externs"
) ")"
; ";"
expression_statement
assignment_expression
identifier "compiler"
= "="
method_invocation
identifier "createCompiler"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "B"
variable_declarator
identifier "options"
= "="
method_invocation
identifier "createOptions"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
array_type
type_identifier "JSModule"
dimensions
[ "["
] "]"
variable_declarator
identifier "modules"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "Result"
variable_declarator
identifier "result"
; ";"
expression_statement
method_invocation
identifier "setRunOptions"
argument_list
( "("
identifier "options"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "inputCharset"
== "=="
field_access
identifier "Charsets"
. "."
identifier "UTF_8"
) ")"
block
{ "{"
expression_statement all 2:1
assignment_expression all 2:1
field_access all 2:1
identifier "options" all 2:1
. "." all 2:1
identifier "outputCharset" all 2:1
= "=" all 2:1
field_access
identifier "Charsets"
. "."
identifier "US_ASCII"
; ";" all 2:1
} "}"
else "else"
block
{ "{"
expression_statement all 2:1
assignment_expression all 2:1
field_access all 2:1
identifier "options" all 2:1
. "." all 2:1
identifier "outputCharset" all 2:1
= "=" all 2:1
identifier "inputCharset"
; ";" all 2:1
} "}"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "writeOutputToFile"
= "="
unary_expression
! "!"
method_invocation
field_access
identifier "options"
. "."
identifier "jsOutputFile"
. "."
identifier "isEmpty"
argument_list
( "("
) ")"
; ";"
if_statement (+31 nodes collapsed)
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "jsFiles"
= "="
field_access
identifier "config"
. "."
identifier "js"
; ";"
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "moduleSpecs"
= "="
field_access
identifier "config"
. "."
identifier "module"
; ";"
if_statement (+118 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "errCode"
= "="
method_invocation
identifier "processResults"
argument_list
( "("
identifier "result"
, ","
identifier "modules"
, ","
identifier "options"
) ")"
; ";"
line_comment "// Close the output if we are writing to a file."
if_statement (+25 nodes collapsed)
return_statement
return "return"
identifier "errCode"
; ";"
} "}"
block_comment "/**\n * Processes the results of the compile job, and retur"...
method_declaration (+788 nodes collapsed)
block_comment "/**\n * Query the flag for the input charset, and return a "...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Query the flag for the output charset.\n *\n * Le"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Returns true if and only if a source map file shoul"...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Returns a stream for outputting the generated exter"...
method_declaration (+114 nodes collapsed)
block_comment "/**\n * Expand a file path specified on the command-line.\n "...
method_declaration (+118 nodes collapsed)
block_comment "/** Expansion function for source map. */"
method_declaration (+57 nodes collapsed)
block_comment "/** Expansion function for the manifest. */"
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Converts a file name into a Writer.\n * Returns nu"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * Converts a file name into a Writer.\n * Returns nu"...
method_declaration (+62 nodes collapsed)
block_comment "/**\n * Outputs the source map found in the compiler to the"...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * Returns the path at which to output map file(s) bas"...
method_declaration (+188 nodes collapsed)
block_comment "/**\n * Outputs the variable and property name maps for the"...
method_declaration (+424 nodes collapsed)
block_comment "/**\n * Create a map of constant names to constant values f"...
method_declaration (+431 nodes collapsed)
block_comment "/**\n * Returns true if and only if a manifest should be ge"...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * Writes the manifest of all compiler input files tha"...
method_declaration (+214 nodes collapsed)
block_comment "/**\n * Prints a set of modules to the manifest file.\n */"
method_declaration (+180 nodes collapsed)
block_comment "/**\n * Prints a list of input names, delimited by newlines"...
method_declaration (+118 nodes collapsed)
class_declaration (+340 nodes collapsed)
block_comment "/**\n * Configurations for the command line configs. Design"...
class_declaration (+1384 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright 2009 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 "Charsets"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "base"
. "."
identifier "Joiner"
; ";"
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 "collect"
. "."
identifier "ImmutableList"
; ";"
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
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 "TokenStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "protobuf"
. "."
identifier "CodedOutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "BufferedWriter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileOutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileWriter"
; ";"
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 "OutputStreamWriter"
; ";"
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 "Writer"
; ";"
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 "ArrayList"
; ";"
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 "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Level"
; ";"
block_comment "/**\n * Implementations of AbstractCommandLineRunner translat"...
class_declaration
modifiers
abstract "abstract"
class "class"
identifier "AbstractCommandLineRunner"
type_parameters
< "<"
type_parameter
type_identifier "A"
type_bound
extends "extends"
type_identifier "Compiler"
, ","
type_parameter
type_identifier "B"
type_bound
extends "extends"
type_identifier "CompilerOptions"
> ">"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CommandLineConfig"
variable_declarator
identifier "config"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Appendable"
variable_declarator
identifier "out"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "PrintStream"
variable_declarator
identifier "err"
; ";"
field_declaration
modifiers
private "private"
type_identifier "A"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
static "static"
type_identifier "Charset"
variable_declarator
identifier "inputCharset"
; ";"
line_comment "// Bookkeeping to measure optimal phase orderings."
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "NUM_RUNS_TO_DETERMINE_OPTIMAL_ORDER"
= "="
decimal_integer_literal "100"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RunTimeStats"
variable_declarator
identifier "runTimeStats"
= "="
object_creation_expression
new "new"
type_identifier "RunTimeStats"
argument_list
( "("
) ")"
; ";"
constructor_declaration (+23 nodes collapsed)
constructor_declaration (+47 nodes collapsed)
block_comment "/**\n * Get the command line config, so that it can be init"...
method_declaration
modifiers
protected "protected"
type_identifier "CommandLineConfig"
identifier "getCommandLineConfig"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "config"
; ";"
} "}"
block_comment "/**\n * Returns the instance of the Compiler to use when {@"...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "A"
identifier "createCompiler"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Returns the instance of the Options to use when {@l"...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "B"
identifier "createOptions"
formal_parameters
( "("
) ")"
; ";"
method_declaration
modifiers
protected "protected"
type_identifier "DiagnosticGroups"
identifier "getDiagnosticGroups"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "DiagnosticGroups"
argument_list
( "("
) ")"
; ";"
} "}"
block_comment "/** No longer does anything. */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Deprecated"
protected "protected"
void_type "void"
identifier "initOptionsFromFlags"
formal_parameters
( "("
formal_parameter
type_identifier "CompilerOptions"
identifier "options"
) ")"
block
{ "{"
} "}"
block_comment "/**\n * Sets options based on the configurations set flags "...
method_declaration
modifiers
final "final"
protected "protected"
void_type "void"
identifier "setRunOptions"
formal_parameters
( "("
formal_parameter
type_identifier "CompilerOptions"
identifier "options"
) ")"
throws
throws "throws"
type_identifier "FlagUsageException"
, ","
type_identifier "IOException"
block
{ "{"
local_variable_declaration
type_identifier "DiagnosticGroups"
variable_declarator
identifier "diagnosticGroups"
= "="
method_invocation
identifier "getDiagnosticGroups"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "diagnosticGroups"
. "."
identifier "setWarningLevels"
argument_list
( "("
identifier "options"
, ","
field_access
identifier "config"
. "."
identifier "jscompError"
, ","
field_access
identifier "CheckLevel"
. "."
identifier "ERROR"
) ")"
; ";"
expression_statement
method_invocation
identifier "diagnosticGroups"
. "."
identifier "setWarningLevels"
argument_list
( "("
identifier "options"
, ","
field_access
identifier "config"
. "."
identifier "jscompWarning"
, ","
field_access
identifier "CheckLevel"
. "."
identifier "WARNING"
) ")"
; ";"
expression_statement
method_invocation
identifier "diagnosticGroups"
. "."
identifier "setWarningLevels"
argument_list
( "("
identifier "options"
, ","
field_access
identifier "config"
. "."
identifier "jscompOff"
, ","
field_access
identifier "CheckLevel"
. "."
identifier "OFF"
) ")"
; ";"
expression_statement
method_invocation
identifier "createDefineReplacements"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "define"
, ","
identifier "options"
) ")"
; ";"
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "manageClosureDependencies"
= "="
field_access
identifier "config"
. "."
identifier "manageClosureDependencies"
; ";"
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "devMode"
= "="
field_access
identifier "config"
. "."
identifier "jscompDevMode"
; ";"
expression_statement
method_invocation
identifier "options"
. "."
identifier "setCodingConvention"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "codingConvention"
) ")"
; ";"
expression_statement
method_invocation
identifier "options"
. "."
identifier "setSummaryDetailLevel"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "summaryDetailLevel"
) ")"
; ";"
expression_statement all 2:1
assignment_expression all 2:1
field_access all 2:1
identifier "options" all 2:1
. "." all 2:1
identifier "outputCharset" all 2:1
= "=" all 2:1
method_invocation
identifier "getOutputCharset"
argument_list
( "("
) ")"
; ";" all 2:1
expression_statement
assignment_expression
identifier "inputCharset"
= "="
method_invocation
identifier "getInputCharset"
argument_list
( "("
) ")"
; ";"
if_statement (+33 nodes collapsed)
if_statement (+33 nodes collapsed)
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "sourceMapDetailLevel"
= "="
field_access
identifier "config"
. "."
identifier "sourceMapDetailLevel"
; ";"
if_statement (+48 nodes collapsed)
if_statement (+48 nodes collapsed)
} "}"
method_declaration
modifiers
final "final"
protected "protected"
type_identifier "A"
identifier "getCompiler"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "compiler"
; ";"
} "}"
block_comment "/**\n * Runs the Compiler and calls exit() with the exit st"...
method_declaration (+151 nodes collapsed)
block_comment "/**\n * Exits the current process. Prints out any \"process\""...
method_declaration (+127 nodes collapsed)
block_comment "/**\n * Returns the PrintStream for writing errors associat"...
method_declaration
modifiers
protected "protected"
type_identifier "PrintStream"
identifier "getErrorPrintStream"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "err"
; ";"
} "}"
block_comment "/**\n * An exception thrown when command-line flags are use"...
class_declaration (+42 nodes collapsed)
block_comment "/**\n * Creates inputs from a list of files.\n *\n * @par"...
method_declaration (+213 nodes collapsed)
block_comment "/**\n * Creates js source code inputs from a list of files."...
method_declaration (+110 nodes collapsed)
block_comment "/**\n * Creates js extern inputs from a list of files.\n *"...
method_declaration (+119 nodes collapsed)
block_comment "/**\n * Creates module objects from a list of module specif"...
method_declaration (+724 nodes collapsed)
block_comment "/**\n * Parses module wrapper specifications.\n *\n * @pa"...
method_declaration (+302 nodes collapsed)
block_comment "/**\n * Writes code to an output stream, optionally wrappin"...
method_declaration (+248 nodes collapsed)
block_comment "/**\n * Creates any directories necessary to write a file t"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * Parses command-line arguments and runs the compiler"...
method_declaration
modifiers
protected "protected"
integral_type
int "int"
identifier "doRun"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "FlagUsageException"
, ","
type_identifier "IOException"
block
{ "{"
expression_statement
method_invocation
identifier "Compiler"
. "."
identifier "setLoggingLevel"
argument_list
( "("
method_invocation
identifier "Level"
. "."
identifier "parse"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "loggingLevel"
) ")"
) ")"
; ";"
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "JSSourceFile"
> ">"
variable_declarator
identifier "externsList"
= "="
method_invocation
identifier "createExterns"
argument_list
( "("
) ")"
; ";"
local_variable_declaration (+23 nodes collapsed)
expression_statement
method_invocation
identifier "externsList"
. "."
identifier "toArray"
argument_list
( "("
identifier "externs"
) ")"
; ";"
expression_statement
assignment_expression
identifier "compiler"
= "="
method_invocation
identifier "createCompiler"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "B"
variable_declarator
identifier "options"
= "="
method_invocation
identifier "createOptions"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
array_type
type_identifier "JSModule"
dimensions
[ "["
] "]"
variable_declarator
identifier "modules"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "Result"
variable_declarator
identifier "result"
; ";"
expression_statement
method_invocation
identifier "setRunOptions"
argument_list
( "("
identifier "options"
) ")"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "writeOutputToFile"
= "="
unary_expression
! "!"
method_invocation
field_access
identifier "options"
. "."
identifier "jsOutputFile"
. "."
identifier "isEmpty"
argument_list
( "("
) ")"
; ";"
if_statement (+31 nodes collapsed)
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "jsFiles"
= "="
field_access
identifier "config"
. "."
identifier "js"
; ";"
local_variable_declaration
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "String"
> ">"
variable_declarator
identifier "moduleSpecs"
= "="
field_access
identifier "config"
. "."
identifier "module"
; ";"
if_statement (+118 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "errCode"
= "="
method_invocation
identifier "processResults"
argument_list
( "("
identifier "result"
, ","
identifier "modules"
, ","
identifier "options"
) ")"
; ";"
line_comment "// Close the output if we are writing to a file."
if_statement (+25 nodes collapsed)
return_statement
return "return"
identifier "errCode"
; ";"
} "}"
block_comment "/**\n * Processes the results of the compile job, and retur"...
method_declaration (+788 nodes collapsed)
block_comment "/**\n * Query the flag for the input charset, and return a "...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Query the flag for the output charset.\n *\n * Le"...
method_declaration
modifiers
private "private"
type_identifier "String"
identifier "getOutputCharset"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "FlagUsageException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
field_access
identifier "config"
. "."
identifier "charset"
. "."
identifier "isEmpty"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "Charset"
. "."
identifier "isSupported"
argument_list
( "("
field_access
identifier "config"
. "."
identifier "charset"
) ")"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "FlagUsageException"
argument_list
( "("
binary_expression
field_access
identifier "config"
. "."
identifier "charset"
+ "+"
string_literal
" "\""
string_fragment " is not a valid charset name."
" "\""
) ")"
; ";"
} "}"
return_statement
return "return"
field_access
identifier "config"
. "."
identifier "charset"
; ";"
} "}"
return_statement
return "return"
string_literal
" "\""
string_fragment "US-ASCII"
" "\""
; ";"
} "}"
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Returns true if and only if a source map file shoul"...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * Returns a stream for outputting the generated exter"...
method_declaration (+114 nodes collapsed)
block_comment "/**\n * Expand a file path specified on the command-line.\n "...
method_declaration (+118 nodes collapsed)
block_comment "/** Expansion function for source map. */"
method_declaration (+57 nodes collapsed)
block_comment "/** Expansion function for the manifest. */"
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Converts a file name into a Writer.\n * Returns nu"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * Converts a file name into a Writer.\n * Returns nu"...
method_declaration (+62 nodes collapsed)
block_comment "/**\n * Outputs the source map found in the compiler to the"...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * Returns the path at which to output map file(s) bas"...
method_declaration (+188 nodes collapsed)
block_comment "/**\n * Outputs the variable and property name maps for the"...
method_declaration (+424 nodes collapsed)
block_comment "/**\n * Create a map of constant names to constant values f"...
method_declaration (+431 nodes collapsed)
block_comment "/**\n * Returns true if and only if a manifest should be ge"...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * Writes the manifest of all compiler input files tha"...
method_declaration (+214 nodes collapsed)
block_comment "/**\n * Prints a set of modules to the manifest file.\n */"
method_declaration (+180 nodes collapsed)
block_comment "/**\n * Prints a list of input names, delimited by newlines"...
method_declaration (+118 nodes collapsed)
class_declaration (+340 nodes collapsed)
block_comment "/**\n * Configurations for the command line configs. Design"...
class_declaration (+1384 nodes collapsed)
} "}"