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/WhileStmtNode.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ast/nodes/WhileStmtNode.java') diff --git a/src/ast/nodes/WhileStmtNode.java b/src/ast/nodes/WhileStmtNode.java index 352cbc0..d371046 100644 --- a/src/ast/nodes/WhileStmtNode.java +++ b/src/ast/nodes/WhileStmtNode.java @@ -19,11 +19,11 @@ public class WhileStmtNode implements Node { } @Override - public ArrayList checkSemantics(SymbolTable ST, int _nesting) { + public ArrayList checkSemantics(SymbolTable ST, int _nesting, FunctionType ft) { ArrayList errors = new ArrayList<>(); - errors.addAll(expr.checkSemantics(ST, _nesting)); - errors.addAll(block.checkSemantics(ST, _nesting)); + errors.addAll(expr.checkSemantics(ST, _nesting, ft)); + errors.addAll(block.checkSemantics(ST, _nesting, ft)); return errors; } @@ -33,7 +33,7 @@ public class WhileStmtNode implements Node { return new VoidType(); } - // TODO: add code generation for while + // TODO: add cgen per while (but it's not requested from the exercise) @Override public String codeGeneration() { return ""; -- cgit v1.2.3-18-g5258