next time check before commiting everything...

This commit is contained in:
2020-02-14 14:19:13 +01:00
parent 80deae6971
commit 441466c83f

View File

@@ -39,20 +39,20 @@ public class Klang {
String out = null; String out = null;
List<String> arguments = Arrays.asList(args); List<String> arguments = Arrays.asList(args);
// if (arguments.size() <= 0 || arguments.contains("-h") || arguments.contains("--help") || arguments.contains("?")) { if (arguments.size() <= 0 || arguments.contains("-h") || arguments.contains("--help") || arguments.contains("?")) {
// System.out.println("\nKaiser Lang Compiler"); System.out.println("\nKaiser Lang Compiler");
// System.out.println("Authors: Dennis Kaiser and Marvin Kaiser"); System.out.println("Authors: Dennis Kaiser and Marvin Kaiser");
// System.out.println(""); System.out.println("");
// System.out.println("Last argument must be file"); System.out.println("Last argument must be file");
// System.out.println(""); System.out.println("");
// System.out.println("Arguments:"); System.out.println("Arguments:");
// System.out.println("--out <file>:\t File to write to"); System.out.println("--out <file>:\t File to write to");
// System.out.println("--evaluate:\t Evaluates the given source code"); System.out.println("--evaluate:\t Evaluates the given source code");
// System.out.println("--pretty:\t Pretty print the given source code"); System.out.println("--pretty:\t Pretty print the given source code");
// System.out System.out
// .println("--no-main:\t Do not generate main function, will be generated as 'start'. Useful for testing"); .println("--no-main:\t Do not generate main function, will be generated as 'start'. Useful for testing");
// return; return;
// } }
if (arguments.contains("--evaluate")) { if (arguments.contains("--evaluate")) {
evaluate = true; evaluate = true;
} }
@@ -71,7 +71,7 @@ public class Klang {
} }
// create a CharStream that reads from standard input // create a CharStream that reads from standard input
CharStream input = CharStreams.fromFileName("code.k"); CharStream input = CharStreams.fromFileName(arguments.get(arguments.size() - 1));
// create a lexer that feeds off of input CharStream // create a lexer that feeds off of input CharStream
KlangLexer lexer = new KlangLexer(input); KlangLexer lexer = new KlangLexer(input);