From 546962f6ba60f1ed3083d7f65bd950b028aecf9f Mon Sep 17 00:00:00 2001 From: laurenz Date: Sat, 18 May 2024 16:23:43 +0200 Subject: [PATCH] accidentally pushed test stuffs --- src/main/java/de/maishai/Compiler.java | 31 +++++--------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/src/main/java/de/maishai/Compiler.java b/src/main/java/de/maishai/Compiler.java index 4b32b3e..08a70a1 100644 --- a/src/main/java/de/maishai/Compiler.java +++ b/src/main/java/de/maishai/Compiler.java @@ -18,25 +18,6 @@ import java.util.List; */ public class Compiler { - public static void main(String[] args) { - generateAST(List.of(""" - public class E2ETests { - char ZZ; - int p; - public E2ETests() { - this.ZZ = 'z'; - } - - public int method(){ - x += 4; - this.p = x; - int x = 5; - return this.p; - } - } - """)); - } - public static Program generateAST(List fromSources) { List classes = new ArrayList<>(); for (String fromSource : fromSources) { @@ -116,10 +97,10 @@ public class Compiler { } } -// public static void main(String[] args) { -// generateByteCodeFileFromFile(List.of("src/main/resources/JavaTestfiles/ClassWithConstructor.java", -// "src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java", -// "src/main/resources/JavaTestfiles/ComplexClass.java"), -// List.of("ClassWithConstructor","ClassWithConstructorAndMethodCall","ComplexClass")); -// } + public static void main(String[] args) { + generateByteCodeFileFromFile(List.of("src/main/resources/JavaTestfiles/ClassWithConstructor.java", + "src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java", + "src/main/resources/JavaTestfiles/ComplexClass.java"), + List.of("ClassWithConstructor","ClassWithConstructorAndMethodCall","ComplexClass")); + } }