From 095a2cb4e9abb88805aac3271874bc512108ff96 Mon Sep 17 00:00:00 2001 From: geno Date: Thu, 27 Jun 2024 18:19:27 +0200 Subject: minor changes --- src/ast/nodes/ArglistNode.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ast/nodes/ArglistNode.java') diff --git a/src/ast/nodes/ArglistNode.java b/src/ast/nodes/ArglistNode.java index 78b4ca7..983d150 100644 --- a/src/ast/nodes/ArglistNode.java +++ b/src/ast/nodes/ArglistNode.java @@ -3,7 +3,6 @@ package ast.nodes; import ast.types.*; import java.util.ArrayList; import java.util.Arrays; - import semanticanalysis.SemanticError; import semanticanalysis.SymbolTable; @@ -37,8 +36,8 @@ public class ArglistNode implements Node { continue; } - if (!ST.top_lookup(argName) && argExpr.typeCheck() instanceof AtomType) { - errors.add(new SemanticError("'" + argName + "' is not defined.")); + if (ST.nslookup(argName) < 0 && argExpr.typeCheck() instanceof AtomType) { + errors.add(new SemanticError("name '" + argName + "' is not defined.")); } } else { errors.addAll(arg.checkSemantics(ST, _nesting)); -- cgit v1.2.3-18-g5258