Skip to content

Commit

Permalink
Merge pull request #43 from VinceAAU/yes
Browse files Browse the repository at this point in the history
yes
  • Loading branch information
DeeKahy authored May 28, 2024
2 parents 4d020a1 + c17895b commit c353b45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public AstNode visitParameterList(CARLParser.ParameterListContext ctx) {
List<ParameterNode> parameters = new ArrayList<>();
if (ctx != null) {
for (int i = 0; i < Math.ceilDiv(ctx.getChildCount(), 4); i++) {
System.out.println(ctx.IDENTIFIER().size());
//System.out.println(ctx.IDENTIFIER().size());
IdentifierNode identifier = new IdentifierNode(ctx.IDENTIFIER(i).getText());
TypeNode type = (TypeNode) visit(ctx.type(i));
parameters.add(new ParameterNode(identifier, type));
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/dk/aau/cs_24_sw_4_16/carl/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,13 @@ public static void main(String... args) {

if (!typeChecker.thereWasAnError) {
EvaluatorExecutor inter = new EvaluatorExecutor();
inter.visit(astRoot);

inter.visit(astRoot);
}
// Interpreter is a class that can traverse the AST and interpret or execute the
// program based on the AST.

} catch (IOException e) {
System.out.println(e.toString());
} catch (Exception e) {
// Catches any exception that occurs within the try block.
// Prints the string representation of the exception to standard output.
System.out.println();
}
}
}
}
3 changes: 2 additions & 1 deletion test.carl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ generateMap(20,25)
generateRooms(3,5,7)
generateCorridors()
generateSpawns()
writeToFile()
writeToFile()

0 comments on commit c353b45

Please sign in to comment.