summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeno <48206120+gabrielegenovese@users.noreply.github.com>2024-06-28 11:20:17 +0200
committerGitHub <noreply@github.com>2024-06-28 11:20:17 +0200
commit089787db950056a35eb1a5930b5b919c45523863 (patch)
tree0df26b94a13ab6d967a462b2eb10eeb6f3937ddd
parent49357616859faaf9e53468ce71d6cd99bda4fb4a (diff)
Update src/ast/Python3VisitorImpl.java
suggested by santo Co-authored-by: Santo Cariotti <santo@dcariotti.me>
-rw-r--r--src/ast/Python3VisitorImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ast/Python3VisitorImpl.java b/src/ast/Python3VisitorImpl.java
index c5f1bfa..bef75cf 100644
--- a/src/ast/Python3VisitorImpl.java
+++ b/src/ast/Python3VisitorImpl.java
@@ -536,11 +536,11 @@ public class Python3VisitorImpl extends Python3ParserBaseVisitor<Node> {
exprlist.add(visit(c));
}
Comp_forContext cfc = ctx.comp_for();
+ Node comp = null;
if (cfc != null) {
- Node comp = visit(ctx.comp_for());
- return new TestlistCompNode(exprlist, comp);
+ comp = visit(ctx.comp_for());
}
- return new TestlistCompNode(exprlist, null);
+ return new TestlistCompNode(exprlist, comp);
}
/**