File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -62,18 +62,22 @@ Late::visit (AST::ForLoopExpr &expr)
62
62
{
63
63
visit_outer_attrs (expr);
64
64
65
- ctx. bindings . enter (BindingSource::For );
65
+ visit (expr. get_iterator_expr () );
66
66
67
- visit (expr.get_pattern ());
67
+ auto vis_method = [this , &expr] () {
68
+ ctx.bindings .enter (BindingSource::For);
68
69
69
- ctx. bindings . exit ( );
70
+ visit (expr. get_pattern () );
70
71
71
- visit (expr.get_iterator_expr ());
72
+ ctx.bindings .exit ();
73
+
74
+ if (expr.has_loop_label ())
75
+ visit (expr.get_loop_label ());
72
76
73
- if (expr.has_loop_label ())
74
- visit (expr. get_loop_label ()) ;
77
+ visit (expr.get_loop_block ());
78
+ } ;
75
79
76
- visit ( expr.get_loop_block ());
80
+ ctx. scoped (Rib::Kind::Normal, expr.get_node_id (), vis_method );
77
81
}
78
82
79
83
void
You can’t perform that action at this time.
0 commit comments