summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeno <48206120+gabrielegenovese@users.noreply.github.com>2024-06-28 11:21:12 +0200
committerGitHub <noreply@github.com>2024-06-28 11:21:12 +0200
commit1d5c4862e136419ab1ed3fcf8d8edaa0ee5fda10 (patch)
tree09525f07bf23b09ebc33f4cee8aafd0041a072a8
parent089787db950056a35eb1a5930b5b919c45523863 (diff)
Update src/ast/Python3VisitorImpl.java
suggested by santo Co-authored-by: Santo Cariotti <santo@dcariotti.me>
-rw-r--r--src/ast/Python3VisitorImpl.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ast/Python3VisitorImpl.java b/src/ast/Python3VisitorImpl.java
index bef75cf..42e2537 100644
--- a/src/ast/Python3VisitorImpl.java
+++ b/src/ast/Python3VisitorImpl.java
@@ -569,11 +569,10 @@ public class Python3VisitorImpl extends Python3ParserBaseVisitor<Node> {
// TODO: Implement comp_if
// Node iter = visit(ctx.comp_if());
Comp_forContext cfc = ctx.comp_for();
+ Node forNode = null;
if (cfc != null) {
- Node forNode = visit(ctx.comp_for());
- return new CompIterNode(forNode);
-
+ forNode = visit(ctx.comp_for());
}
- return new CompIterNode(null);
+ return new CompIterNode(forNode);
}
}