From dc70029b910ff19da6f0b92e0ebf71a013288721 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 1 Mar 2016 05:22:12 +0000 Subject: [PATCH] transforms.asttyped_rewriter: set loc for ForT (fixes #302). --- artiq/compiler/transforms/asttyped_rewriter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/compiler/transforms/asttyped_rewriter.py b/artiq/compiler/transforms/asttyped_rewriter.py index 70790a613..43455143f 100644 --- a/artiq/compiler/transforms/asttyped_rewriter.py +++ b/artiq/compiler/transforms/asttyped_rewriter.py @@ -477,7 +477,7 @@ class ASTTypedRewriter(algorithm.Transformer): target=node.target, iter=node.iter, body=node.body, orelse=node.orelse, trip_count=None, trip_interval=None, keyword_loc=node.keyword_loc, in_loc=node.in_loc, for_colon_loc=node.for_colon_loc, - else_loc=node.else_loc, else_colon_loc=node.else_colon_loc) + else_loc=node.else_loc, else_colon_loc=node.else_colon_loc, loc=node.loc) return node def visit_withitem(self, node):