summaryrefslogtreecommitdiff
path: root/src/main/java/no/eliashaugsbakk/kompilator/Main.java
diff options
context:
space:
mode:
authorElias Haugsbakk <[email protected]>2026-09-21 14:36:59 +0200
committerElias Haugsbakk <[email protected]>2026-09-21 14:36:59 +0200
commite7720e2d9e1319712f85cb0527e17f1251bd7d2c (patch)
tree19cb8b0f49a0fe234fc0c0bfb41dc5c520b1630b /src/main/java/no/eliashaugsbakk/kompilator/Main.java
parent84215a9b8f79035ebec83fe38bc696b5ae78de5d (diff)
add position info to semantic and IRgen exceptions
Diffstat (limited to 'src/main/java/no/eliashaugsbakk/kompilator/Main.java')
-rw-r--r--src/main/java/no/eliashaugsbakk/kompilator/Main.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/no/eliashaugsbakk/kompilator/Main.java b/src/main/java/no/eliashaugsbakk/kompilator/Main.java
index bdd1b1e..512682c 100644
--- a/src/main/java/no/eliashaugsbakk/kompilator/Main.java
+++ b/src/main/java/no/eliashaugsbakk/kompilator/Main.java
@@ -43,7 +43,7 @@ public class Main {
try {
inputProgram = fileReaderWriter.readFile(inputFileName);
} catch (FileReaderWriterException e) {
- IO.println("Could not read input file: " + inputFileName + "\n\n" + e.getMessage());
+ IO.println("err: Could not read input file: " + inputFileName + "\n\n" + e.getMessage());
System.exit(1);
}
@@ -52,14 +52,14 @@ public class Main {
try {
ast = new Parser(tokens).parse();
} catch (ParserException e) {
- IO.println("Error while parsing: " + e.getMessage());
+ IO.println(e.getMessage());
System.exit(1);
}
try {
new Analyzer(ast).analyze();
} catch (SemanticException e) {
- IO.println("Semantic error: " + e.getMessage());
+ IO.println(e.getMessage());
System.exit(1);
}