Search in sources :

Example 1 with BlackHoleErrorManager

use of com.google.javascript.jscomp.BlackHoleErrorManager in project closure-compiler by google.

the class MatchersTest method getCompiler.

private static Compiler getCompiler(String externs, String jsInput) {
    Compiler compiler = new Compiler(new BlackHoleErrorManager());
    compiler.disableThreads();
    CompilerOptions options = RefactoringDriver.getCompilerOptions();
    compiler.compile(ImmutableList.of(SourceFile.fromCode("externs", externs)), ImmutableList.of(SourceFile.fromCode("test", jsInput)), options);
    return compiler;
}
Also used : Compiler(com.google.javascript.jscomp.Compiler) BlackHoleErrorManager(com.google.javascript.jscomp.BlackHoleErrorManager) CompilerOptions(com.google.javascript.jscomp.CompilerOptions)

Example 2 with BlackHoleErrorManager

use of com.google.javascript.jscomp.BlackHoleErrorManager in project closure-compiler by google.

the class IntegrationTestCase method compile.

protected Compiler compile(CompilerOptions options, ImmutableList<JSChunk> modules) {
    Compiler compiler = useNoninjectingCompiler ? createNoninjectingCompiler(new BlackHoleErrorManager()) : createCompiler(new BlackHoleErrorManager());
    lastCompiler = compiler;
    compiler.compileModules(externs, modules, options);
    return compiler;
}
Also used : NoninjectingCompiler(com.google.javascript.jscomp.testing.NoninjectingCompiler) Compiler(com.google.javascript.jscomp.Compiler) BlackHoleErrorManager(com.google.javascript.jscomp.BlackHoleErrorManager)

Example 3 with BlackHoleErrorManager

use of com.google.javascript.jscomp.BlackHoleErrorManager in project closure-compiler by google.

the class RefactoringDriver method createCompiler.

private static Compiler createCompiler(List<SourceFile> inputs, List<SourceFile> externs, CompilerOptions compilerOptions) {
    Compiler compiler = new Compiler(new BlackHoleErrorManager());
    compiler.disableThreads();
    compiler.compile(externs, inputs, compilerOptions);
    return compiler;
}
Also used : Compiler(com.google.javascript.jscomp.Compiler) BlackHoleErrorManager(com.google.javascript.jscomp.BlackHoleErrorManager)

Aggregations

BlackHoleErrorManager (com.google.javascript.jscomp.BlackHoleErrorManager)3 Compiler (com.google.javascript.jscomp.Compiler)3 CompilerOptions (com.google.javascript.jscomp.CompilerOptions)1 NoninjectingCompiler (com.google.javascript.jscomp.testing.NoninjectingCompiler)1