diff options
author | geno <gabriele.genovese2@studio.unibo.it> | 2024-06-27 18:19:27 +0200 |
---|---|---|
committer | geno <gabriele.genovese2@studio.unibo.it> | 2024-06-27 18:19:27 +0200 |
commit | 095a2cb4e9abb88805aac3271874bc512108ff96 (patch) | |
tree | 2f4a14954b6efac11f108c6eb862b1c12bee40d7 /src/ast/nodes/ArglistNode.java | |
parent | 673117132daa9c4fdd103189b5cd9a32a3731f5a (diff) |
minor changes
Diffstat (limited to 'src/ast/nodes/ArglistNode.java')
-rw-r--r-- | src/ast/nodes/ArglistNode.java | 5 |
1 files changed, 2 insertions, 3 deletions
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)); |