From e7720e2d9e1319712f85cb0527e17f1251bd7d2c Mon Sep 17 00:00:00 2001 From: Elias Haugsbakk Date: Mon, 21 Sep 2026 14:36:59 +0200 Subject: add position info to semantic and IRgen exceptions --- .../kompilator/semanticAnalysis/AnalyzerTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/java/no/eliashaugsbakk/kompilator/semanticAnalysis') diff --git a/src/test/java/no/eliashaugsbakk/kompilator/semanticAnalysis/AnalyzerTest.java b/src/test/java/no/eliashaugsbakk/kompilator/semanticAnalysis/AnalyzerTest.java index 13827e4..7d26017 100644 --- a/src/test/java/no/eliashaugsbakk/kompilator/semanticAnalysis/AnalyzerTest.java +++ b/src/test/java/no/eliashaugsbakk/kompilator/semanticAnalysis/AnalyzerTest.java @@ -31,17 +31,17 @@ class AnalyzerTest { } private AST buildAST(String functionName, String argument) { - FunctionCall call = new FunctionCall(functionName, List.of(new StringLiteral(argument))); - ExpressionStatement stmt = new ExpressionStatement(call); - Program program = new Program(); + FunctionCall call = new FunctionCall(null, functionName, List.of(new StringLiteral(null, argument))); + ExpressionStatement stmt = new ExpressionStatement(null, call); + Program program = new Program(null); program.addStatement(stmt); return new AST(program); } private AST buildASTNoArgs(String functionName) { - FunctionCall call = new FunctionCall(functionName, List.of()); - ExpressionStatement stmt = new ExpressionStatement(call); - Program program = new Program(); + FunctionCall call = new FunctionCall(null, functionName, List.of()); + ExpressionStatement stmt = new ExpressionStatement(null, call); + Program program = new Program(null); program.addStatement(stmt); return new AST(program); } -- cgit v1.2.3