script parameters
still a lot of things to do
This commit is contained in:
@@ -20,6 +20,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.CompileCompilerDependenciesTest;
|
||||
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
|
||||
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM;
|
||||
import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
|
||||
|
||||
@@ -36,7 +37,8 @@ public class GenerationUtils {
|
||||
|
||||
public static GenerationState compileFileGetGenerationStateForTest(JetFile psiFile, @NotNull CompilerSpecialMode compilerSpecialMode) {
|
||||
final AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegrationAndCheckForErrors(
|
||||
psiFile, CompileCompilerDependenciesTest.compilerDependenciesForTests(compilerSpecialMode, true));
|
||||
psiFile, Collections.<AnalyzerScriptParameter>emptyList(),
|
||||
CompileCompilerDependenciesTest.compilerDependenciesForTests(compilerSpecialMode, true));
|
||||
analyzeExhaust.throwIfError();
|
||||
GenerationState state = new GenerationState(psiFile.getProject(), ClassBuilderFactories.binaries(false), analyzeExhaust, Collections.singletonList(psiFile));
|
||||
state.compileCorrectFiles(CompilationErrorHandler.THROW_EXCEPTION);
|
||||
|
||||
Reference in New Issue
Block a user