From fb89b8c0885ee4e289cfb577bbabf0ee66b05024 Mon Sep 17 00:00:00 2001 From: geno Date: Wed, 26 Jun 2024 18:23:05 +0200 Subject: test dir added, fix bug in ExprNode (added by myself obv) --- src/Main.java | 2 +- src/ast/nodes/ExprNode.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Main.java b/src/Main.java index 121d3d1..21645db 100644 --- a/src/Main.java +++ b/src/Main.java @@ -20,7 +20,7 @@ public class Main { try { // String fileStr = file.getPath(); // FIXME: use the fileStr above - String fileStr = "./progs/test2.py"; + String fileStr = "./test/1a.py"; System.out.println(fileStr); System.out.println(readFile(fileStr)); CharStream cs = CharStreams.fromFileName(fileStr); diff --git a/src/ast/nodes/ExprNode.java b/src/ast/nodes/ExprNode.java index eea69f8..4fbe166 100644 --- a/src/ast/nodes/ExprNode.java +++ b/src/ast/nodes/ExprNode.java @@ -132,6 +132,8 @@ public class ExprNode implements Node { errors.addAll(trailer.checkSemantics(ST, _nesting)); } } + } else if (atom != null) { + errors.addAll(atom.checkSemantics(ST, _nesting)); } if (compOp != null) { -- cgit v1.2.3-18-g5258