Skip to content

Commit

Permalink
Rename keepGoing option to continueAfterErrors which is more descriptive
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123262002
  • Loading branch information
tbreisacher authored and blickly committed May 25, 2016
1 parent a2c143e commit f4a119b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/com/google/javascript/jscomp/Compiler.java
Expand Up @@ -2155,7 +2155,7 @@ Config getParserConfig(ConfigContext context) {
protected Config createConfig(Config.LanguageMode mode) { protected Config createConfig(Config.LanguageMode mode) {
Config config = ParserRunner.createConfig(mode, options.extraAnnotationNames); Config config = ParserRunner.createConfig(mode, options.extraAnnotationNames);
config.setPreserveDetailedSourceInfo(options.preservesDetailedSourceInfo()); config.setPreserveDetailedSourceInfo(options.preservesDetailedSourceInfo());
config.setKeepGoing(options.canKeepGoing()); config.setKeepGoing(options.canContinueAfterErrors());
config.setParseJsDocDocumentation(options.isParseJsDocDocumentation()); config.setParseJsDocDocumentation(options.isParseJsDocDocumentation());
config.setPreserveJsDocWhitespace(options.isPreserveJsDocWhitespace()); config.setPreserveJsDocWhitespace(options.isPreserveJsDocWhitespace());
return config; return config;
Expand Down Expand Up @@ -2231,14 +2231,14 @@ public int getWarningCount() {


@Override @Override
boolean hasHaltingErrors() { boolean hasHaltingErrors() {
return !getOptions().canKeepGoing() && getErrorCount() > 0; return !getOptions().canContinueAfterErrors() && getErrorCount() > 0;
} }


/** /**
* Consults the {@link ErrorManager} to see if we've encountered errors * Consults the {@link ErrorManager} to see if we've encountered errors
* that should halt compilation. <p> * that should halt compilation. <p>
* *
* If {@link CompilerOptions#ideMode} is {@code true}, this function * If {@link CompilerOptions#canContinueAfterErrors} is {@code true}, this function
* always returns {@code false} without consulting the error manager. The * always returns {@code false} without consulting the error manager. The
* error manager will continue to be told about new errors and warnings, but * error manager will continue to be told about new errors and warnings, but
* the compiler will complete compilation of all inputs.<p> * the compiler will complete compilation of all inputs.<p>
Expand Down
12 changes: 6 additions & 6 deletions src/com/google/javascript/jscomp/CompilerOptions.java
Expand Up @@ -107,7 +107,7 @@ public void setInferConst(boolean value) {


private boolean allowHotswapReplaceScript = false; private boolean allowHotswapReplaceScript = false;
private boolean preserveDetailedSourceInfo = false; private boolean preserveDetailedSourceInfo = false;
private boolean keepGoing = false; private boolean continueAfterErrors = false;


private boolean parseJsDocDocumentation = false; private boolean parseJsDocDocumentation = false;
private boolean preserveJsDocWhitespace = false; private boolean preserveJsDocWhitespace = false;
Expand Down Expand Up @@ -1832,7 +1832,7 @@ public void setPropertyInvalidationErrors(
@Deprecated @Deprecated
public void setIdeMode(boolean ideMode) { public void setIdeMode(boolean ideMode) {
setChecksOnly(ideMode); setChecksOnly(ideMode);
setKeepGoing(ideMode); setContinueAfterErrors(ideMode);
setAllowHotswapReplaceScript(ideMode); setAllowHotswapReplaceScript(ideMode);
setPreserveDetailedSourceInfo(ideMode); setPreserveDetailedSourceInfo(ideMode);
setParseJsDocDocumentation(ideMode); setParseJsDocDocumentation(ideMode);
Expand All @@ -1854,12 +1854,12 @@ boolean preservesDetailedSourceInfo() {
return preserveDetailedSourceInfo; return preserveDetailedSourceInfo;
} }


public void setKeepGoing(boolean keepGoing) { public void setContinueAfterErrors(boolean continueAfterErrors) {
this.keepGoing = keepGoing; this.continueAfterErrors = continueAfterErrors;
} }


boolean canKeepGoing() { boolean canContinueAfterErrors() {
return keepGoing; return continueAfterErrors;
} }


/** /**
Expand Down
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/ControlFlowAnalysis.java
Expand Up @@ -588,7 +588,7 @@ private void handleBreak(Node node) {
lastJump = cur; lastJump = cur;
} }
if (parent == null) { if (parent == null) {
if (compiler.getOptions().canKeepGoing()) { if (compiler.getOptions().canContinueAfterErrors()) {
// In IDE mode, we expect that the data flow graph may // In IDE mode, we expect that the data flow graph may
// not be well-formed. // not be well-formed.
return; return;
Expand Down
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/JsAst.java
Expand Up @@ -166,7 +166,7 @@ private void parse(AbstractCompiler compiler) {
// we don't want to fail if the error was excluded by a warning guard, conversely // we don't want to fail if the error was excluded by a warning guard, conversely
// we do want to fail if a warning was promoted to an error. // we do want to fail if a warning was promoted to an error.
|| (errorManager.getErrorCount() > startErrorCount || (errorManager.getErrorCount() > startErrorCount
&& !compiler.getOptions().canKeepGoing())) { && !compiler.getOptions().canContinueAfterErrors())) {
// There was a parse error or IOException, so use a dummy block. // There was a parse error or IOException, so use a dummy block.




Expand Down

0 comments on commit f4a119b

Please sign in to comment.