Skip to content

Commit

Permalink
merged both compiler and runner into one
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelsack committed May 22, 2022
1 parent 20c2abc commit b1a5fcd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
7 changes: 7 additions & 0 deletions HouseOfCompiler/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Test {

void main() {
System.out.println('t');
}

}
4 changes: 3 additions & 1 deletion HouseOfCompiler/src/main/java/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ public static void main(String[] args) {
System.out.println("Please provide a fileName to compile");
return;
}
if (args.length == 1) {
if (args.length == 1 && args[0].endsWith(".class")) {
Compiler.getFactory().runCode(args[0]);
} else if (args.length == 1 && args[0].endsWith(".java")) {
Compiler.getFactory().compile(args[0], ".");
} else {
Compiler.getFactory().compile(args[0], args[1]);
Expand Down
15 changes: 0 additions & 15 deletions HouseOfCompiler/src/main/java/main/Runner.java

This file was deleted.

0 comments on commit b1a5fcd

Please sign in to comment.