From 99c46bf37f495ea9d9bebc805e1cd17745cd6b25 Mon Sep 17 00:00:00 2001 From: Victorious3 Date: Tue, 14 Feb 2023 11:36:08 +0100 Subject: [PATCH] Fix console interface --- src/main/java/de/dhbwstuttgart/core/ConsoleInterface.java | 2 +- src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java | 2 +- src/test/java/targetast/TestCodegen.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/core/ConsoleInterface.java b/src/main/java/de/dhbwstuttgart/core/ConsoleInterface.java index 946d7f10..b1e60070 100644 --- a/src/main/java/de/dhbwstuttgart/core/ConsoleInterface.java +++ b/src/main/java/de/dhbwstuttgart/core/ConsoleInterface.java @@ -36,7 +36,7 @@ public class ConsoleInterface { } } JavaTXCompiler compiler = new JavaTXCompiler(input, classpath); - compiler.typeInference(); + //compiler.typeInference(); compiler.generateBytecode(outputPath); } diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index 89b4d482..0fc6e18a 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -850,7 +850,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 { List typeinferenceResult = this.typeInference(); diff --git a/src/test/java/targetast/TestCodegen.java b/src/test/java/targetast/TestCodegen.java index 39973a90..73d3dfdf 100644 --- a/src/test/java/targetast/TestCodegen.java +++ b/src/test/java/targetast/TestCodegen.java @@ -45,6 +45,7 @@ public class TestCodegen { var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/", filename).toFile(); var compiler = new JavaTXCompiler(List.of(file), List.of(file.getParentFile())); var resultSet = compiler.typeInference(); + var sourceFile = compiler.sourceFiles.get(file); var converter = new ASTToTargetAST(resultSet, sourceFile, classLoader); var classes = compiler.sourceFiles.get(file).getClasses();