summaryrefslogtreecommitdiff
path: root/src/ast/nodes/CompIterNode.java
diff options
context:
space:
mode:
authorGeno <48206120+gabrielegenovese@users.noreply.github.com>2024-07-11 12:57:56 +0200
committerGitHub <noreply@github.com>2024-07-11 12:57:56 +0200
commitb50c7e99603e9f85d82d700d62c16c4fcef88715 (patch)
tree5052206f06e0426a43599cb236652614db04d22e /src/ast/nodes/CompIterNode.java
parentf0692ff5f9e39cbd1c203e9d5abebf55a3d0f6fc (diff)
Code generation (#20)
Co-authored-by: geno <gabrigeno@gmail> Co-authored-by: Santo Cariotti <santo@dcariotti.me>
Diffstat (limited to 'src/ast/nodes/CompIterNode.java')
-rw-r--r--src/ast/nodes/CompIterNode.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ast/nodes/CompIterNode.java b/src/ast/nodes/CompIterNode.java
index 1cc8a9b..de443fa 100644
--- a/src/ast/nodes/CompIterNode.java
+++ b/src/ast/nodes/CompIterNode.java
@@ -11,18 +11,17 @@ import semanticanalysis.SymbolTable;
public class CompIterNode implements Node {
protected CompForNode comp_for;
- // protected CompIfNode compIfNode;
public CompIterNode(Node comp_for) {
this.comp_for = (CompForNode) comp_for;
}
@Override
- public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) {
+ public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting, FunctionType ft) {
ArrayList<SemanticError> errors = new ArrayList<>();
if (comp_for != null) {
- errors.addAll(comp_for.checkSemantics(ST, _nesting));
+ errors.addAll(comp_for.checkSemantics(ST, _nesting, ft));
}
return errors;
}
@@ -32,7 +31,9 @@ public class CompIterNode implements Node {
return new VoidType();
}
- // TODO: add code generation for arglist node
+ /**
+ * We do not want to provide the code generation for this stuff.
+ */
@Override
public String codeGeneration() {
return "";