com.google.javascript.jscomp.Compiler.initBasedOnOptions()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 JavaScript  
字(1.7k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中com.google.javascript.jscomp.Compiler.initBasedOnOptions()方法的一些代码示例,展示了Compiler.initBasedOnOptions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Compiler.initBasedOnOptions()方法的具体详情如下:
包路径:com.google.javascript.jscomp.Compiler
类名称:Compiler
方法名:initBasedOnOptions

Compiler.initBasedOnOptions介绍

[英]Do any initialization that is dependent on the compiler options.
[中]执行任何依赖于编译器选项的初始化。

代码示例

代码示例来源: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

/**
 * Initializes the instance state needed for a compile job if the sources
 * are in modules.
 */
public <T extends SourceFile> void initModules(
  List<T> externs, List<JSModule> modules, CompilerOptions options) {
 initOptions(options);
 checkFirstModule(modules);
 this.externs = makeExternInputs(externs);
 // Generate the module graph, and report any errors in the module specification as errors.
 try {
  this.moduleGraph = new JSModuleGraph(modules);
 } catch (JSModuleGraph.ModuleDependenceException e) {
  // problems with the module format.  Report as an error.  The
  // message gives all details.
  report(JSError.make(MODULE_DEPENDENCY_ERROR,
    e.getModule().getName(), e.getDependentModule().getName()));
  return;
 }
 // Creating the module graph can move weak source around, and end up with empty modules.
 fillEmptyModules(getModules());
 this.commentsPerFile = new ConcurrentHashMap<>(moduleGraph.getInputCount());
 initBasedOnOptions();
 initInputsByIdMap();
 initAST();
}

代码示例来源:origin: org.scala-js/closure-compiler-java-6

initBasedOnOptions();

相关文章

Compiler类方法