Fix console interface

This commit is contained in:
Victorious3 2023-02-14 11:36:08 +01:00 committed by JanUlrich
parent eb5a339f56
commit 5981a9362c
3 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class ConsoleInterface {
} }
} }
JavaTXCompiler compiler = new JavaTXCompiler(input, classpath); JavaTXCompiler compiler = new JavaTXCompiler(input, classpath);
compiler.typeInference(); //compiler.typeInference();
compiler.generateBytecode(outputPath); compiler.generateBytecode(outputPath);
} }

View File

@ -899,7 +899,7 @@ public class JavaTXCompiler {
} }
/** /**
* @param path - can be null, then class file output is in the same directory as the parsed source files * @param path - output-Directory can be null, then class file output is in the same directory as the parsed source files
*/ */
public void generateBytecode(File path) throws ClassNotFoundException, IOException, BytecodeGeneratorError { public void generateBytecode(File path) throws ClassNotFoundException, IOException, BytecodeGeneratorError {
List<ResultSet> typeinferenceResult = this.typeInference(); List<ResultSet> typeinferenceResult = this.typeInference();

View File

@ -39,6 +39,7 @@ public class TestCodegen {
var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/bytecode/javFiles/", filename).toFile(); var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/bytecode/javFiles/", filename).toFile();
var compiler = new JavaTXCompiler(file); var compiler = new JavaTXCompiler(file);
var resultSet = compiler.typeInference(); var resultSet = compiler.typeInference();
var sourceFile = compiler.sourceFiles.get(file); var sourceFile = compiler.sourceFiles.get(file);
var converter = new ASTToTargetAST(resultSet, sourceFile, classLoader); var converter = new ASTToTargetAST(resultSet, sourceFile, classLoader);
var classes = compiler.sourceFiles.get(file).getClasses(); var classes = compiler.sourceFiles.get(file).getClasses();