From b50c7e99603e9f85d82d700d62c16c4fcef88715 Mon Sep 17 00:00:00 2001 From: Geno <48206120+gabrielegenovese@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:57:56 +0200 Subject: Code generation (#20) Co-authored-by: geno Co-authored-by: Santo Cariotti --- src/ast/nodes/ParamlistNode.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ast/nodes/ParamlistNode.java') diff --git a/src/ast/nodes/ParamlistNode.java b/src/ast/nodes/ParamlistNode.java index e8c9a42..9e8d75c 100644 --- a/src/ast/nodes/ParamlistNode.java +++ b/src/ast/nodes/ParamlistNode.java @@ -12,16 +12,16 @@ public class ParamlistNode implements Node { private final ArrayList params; - public ParamlistNode(ArrayList _params) { - params = _params; + public ParamlistNode(ArrayList params) { + this.params = params; } @Override - public ArrayList checkSemantics(SymbolTable ST, int _nesting) { + public ArrayList checkSemantics(SymbolTable ST, int _nesting, FunctionType ft) { ArrayList errors = new ArrayList<>(); for (var param : params) { - errors.addAll(param.checkSemantics(ST, _nesting)); + errors.addAll(param.checkSemantics(ST, _nesting, ft)); } return errors; @@ -36,7 +36,6 @@ public class ParamlistNode implements Node { return new VoidType(); } - // TODO: code generation for param list @Override public String codeGeneration() { return ""; -- cgit v1.2.3-18-g5258