Skip to content

Commit

Permalink
Remove unused methods from TranspilationPasses
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188271287
  • Loading branch information
brad4d authored and lauraharker committed Mar 9, 2018
1 parent c340e61 commit b71efdc
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions src/com/google/javascript/jscomp/TranspilationPasses.java
Expand Up @@ -412,48 +412,6 @@ static boolean isScriptEs6OrHigher(Node script) {
return features != null && !FeatureSet.ES5.contains(features);
}

/**
* Process checks if the input language contains the provided features, on any JS file that has
* ES6 features.
*
* @param compiler An AbstractCompiler
* @param combinedRoot The combined root for all JS files.
* @param featureSet The features which this check targets.
* @param callbacks The callbacks that should be invoked if a file has ES6 features.
*/
static void processCheck(
AbstractCompiler compiler, Node combinedRoot, FeatureSet featureSet, Callback... callbacks) {
if (compiler.getOptions().getLanguageIn().toFeatureSet().contains(featureSet)) {
for (Node singleRoot : combinedRoot.children()) {
if (isScriptEs6OrHigher(singleRoot)) {
for (Callback callback : callbacks) {
NodeTraversal.traverseEs6(compiler, singleRoot, callback);
}
}
}
}
}

/**
* Hot-swap ES6+ checks if the input language contains the provided features, on any JS file that
* has ES6 features.
*
* @param compiler An AbstractCompiler
* @param scriptRoot The SCRIPT root for the JS file.
* @param featureSet The features which this check targets.
* @param callbacks The callbacks that should be invoked if the file has ES6 features.
*/
static void hotSwapCheck(
AbstractCompiler compiler, Node scriptRoot, FeatureSet featureSet, Callback... callbacks) {
if (compiler.getOptions().getLanguageIn().toFeatureSet().contains(featureSet)) {
if (isScriptEs6OrHigher(scriptRoot)) {
for (Callback callback : callbacks) {
NodeTraversal.traverseEs6(compiler, scriptRoot, callback);
}
}
}
}

/**
* Process transpilations if the input language needs transpilation from certain features, on any
* JS file that has ES6 features.
Expand Down

0 comments on commit b71efdc

Please sign in to comment.