From e395c4d96b1c2680b4f703acf26b4b916838235c Mon Sep 17 00:00:00 2001 From: Maximilian Stahl Date: Fri, 31 May 2024 11:32:11 +0200 Subject: [PATCH] Fixed Boolean and Char Literal --- src/main/java/parser/ASTBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/parser/ASTBuilder.java b/src/main/java/parser/ASTBuilder.java index 7e7422d..9d16758 100644 --- a/src/main/java/parser/ASTBuilder.java +++ b/src/main/java/parser/ASTBuilder.java @@ -252,11 +252,11 @@ public class ASTBuilder extends SimpleJavaBaseVisitor { @Override public ASTNode visitBooleanLiteral(SimpleJavaParser.BooleanLiteralContext ctx) { - return super.visitBooleanLiteral(ctx); + return (ASTNode) new BooleanLiteralNode(ctx.getText()); } @Override public ASTNode visitCharLiteral(SimpleJavaParser.CharLiteralContext ctx) { - return super.visitCharLiteral(ctx); + return (ASTNode) new CharLiteralNode(ctx.getText()); } }