本文整理了Java中com.google.javascript.jscomp.Compiler.initCompilerOptionsIfTesting()
方法的一些代码示例,展示了Compiler.initCompilerOptionsIfTesting()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Compiler.initCompilerOptionsIfTesting()
方法的具体详情如下:
包路径:com.google.javascript.jscomp.Compiler
类名称:Compiler
方法名:initCompilerOptionsIfTesting
暂无
代码示例来源:origin: com.google.javascript/closure-compiler
/**
* Generates JavaScript source code for an AST, doesn't generate source
* map info.
*/
@Override
public String toSource(Node n) {
initCompilerOptionsIfTesting();
return toSource(n, null, true);
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
/**
* Generates JavaScript source code for an AST, doesn't generate source
* map info.
*/
@Override
public String toSource(Node n) {
initCompilerOptionsIfTesting();
return toSource(n, null, true);
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
@Override
Node parseSyntheticCode(String fileName, String js) {
initCompilerOptionsIfTesting();
return parse(SourceFile.fromCode(fileName, js));
}
代码示例来源:origin: com.google.javascript/closure-compiler
@Override
@VisibleForTesting
Node parseTestCode(String js) {
initCompilerOptionsIfTesting();
initBasedOnOptions();
return parseCodeHelper(SourceFile.fromCode("[testcode]", js));
}
代码示例来源:origin: com.google.javascript/closure-compiler
public Node parse(SourceFile file) {
initCompilerOptionsIfTesting();
logger.finest("Parsing: " + file.getName());
return new JsAst(file).getAstRoot(this);
}
代码示例来源:origin: com.google.javascript/closure-compiler
@Override
Node parseSyntheticCode(String fileName, String js) {
initCompilerOptionsIfTesting();
SourceFile source = SourceFile.fromCode(fileName, js);
addFilesToSourceMap(ImmutableList.of(source));
return parseCodeHelper(source);
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
@Override
Node parseTestCode(String js) {
initCompilerOptionsIfTesting();
CompilerInput input = new CompilerInput(
SourceFile.fromCode("[testcode]", js));
if (inputsById == null) {
inputsById = new HashMap<InputId, CompilerInput>();
}
putCompilerInput(input.getInputId(), input);
return input.getAstRoot(this);
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
public Node parse(SourceFile file) {
initCompilerOptionsIfTesting();
addToDebugLog("Parsing: " + file.getName());
return new JsAst(file).getAstRoot(this);
}
代码示例来源:origin: com.google.javascript/closure-compiler
@Override
public void report(JSError error) {
CheckLevel level = error.getDefaultLevel();
if (warningsGuard != null) {
CheckLevel newLevel = warningsGuard.level(error);
if (newLevel != null) {
level = newLevel;
}
}
if (level.isOn()) {
initCompilerOptionsIfTesting();
if (getOptions().errorHandler != null) {
getOptions().errorHandler.report(level, error);
}
errorManager.report(level, error);
}
}
代码示例来源:origin: org.scala-js/closure-compiler-java-6
@Override
public void report(JSError error) {
CheckLevel level = error.getDefaultLevel();
if (warningsGuard != null) {
CheckLevel newLevel = warningsGuard.level(error);
if (newLevel != null) {
level = newLevel;
}
}
if (level.isOn()) {
initCompilerOptionsIfTesting();
if (getOptions().errorHandler != null) {
getOptions().errorHandler.report(level, error);
}
errorManager.report(level, error);
}
}
内容来源于网络,如有侵权,请联系作者删除!