From 089787db950056a35eb1a5930b5b919c45523863 Mon Sep 17 00:00:00 2001 From: Geno <48206120+gabrielegenovese@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:20:17 +0200 Subject: Update src/ast/Python3VisitorImpl.java suggested by santo Co-authored-by: Santo Cariotti --- src/ast/Python3VisitorImpl.java | 6 +++--- 1 file 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 { 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); } /** -- cgit v1.2.3-18-g5258