diff options
author | Geno <48206120+gabrielegenovese@users.noreply.github.com> | 2024-07-11 12:57:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 12:57:56 +0200 |
commit | b50c7e99603e9f85d82d700d62c16c4fcef88715 (patch) | |
tree | 5052206f06e0426a43599cb236652614db04d22e /src/ast/nodes/CompForNode.java | |
parent | f0692ff5f9e39cbd1c203e9d5abebf55a3d0f6fc (diff) |
Code generation (#20)
Co-authored-by: geno <gabrigeno@gmail>
Co-authored-by: Santo Cariotti <santo@dcariotti.me>
Diffstat (limited to 'src/ast/nodes/CompForNode.java')
-rw-r--r-- | src/ast/nodes/CompForNode.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ast/nodes/CompForNode.java b/src/ast/nodes/CompForNode.java index 405a400..1f51af5 100644 --- a/src/ast/nodes/CompForNode.java +++ b/src/ast/nodes/CompForNode.java @@ -22,13 +22,13 @@ public class CompForNode implements Node { } @Override - public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { + public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting, FunctionType ft) { ArrayList<SemanticError> errors = new ArrayList<>(); - errors.addAll(exprlist.checkSemantics(ST, _nesting)); - errors.addAll(single_expr.checkSemantics(ST, _nesting)); + errors.addAll(exprlist.checkSemantics(ST, _nesting, ft)); + errors.addAll(single_expr.checkSemantics(ST, _nesting, ft)); if (comp_iter != null) { - errors.addAll(comp_iter.checkSemantics(ST, _nesting)); + errors.addAll(comp_iter.checkSemantics(ST, _nesting, ft)); } return errors; } @@ -38,7 +38,9 @@ public class CompForNode implements Node { return new VoidType(); } - // TODO: add code generation for arglist node + /** + * We do not want to provide the code generation for the for list comprehension. + */ @Override public String codeGeneration() { return ""; |