File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -162,15 +162,14 @@ def visit_assignment_stmt(self, s: AssignmentStmt) -> None:
162
162
163
163
def visit_match_stmt (self , s : MatchStmt ) -> None :
164
164
for i in range (len (s .patterns )):
165
- self .enter_block ()
166
- s .patterns [i ].accept (self )
167
- guard = s .guards [i ]
168
- if guard is not None :
169
- guard .accept (self )
170
- # We already entered a block, so visit this block's statements directly
171
- for stmt in s .bodies [i ].body :
172
- stmt .accept (self )
173
- self .leave_block ()
165
+ with self .enter_block ():
166
+ s .patterns [i ].accept (self )
167
+ guard = s .guards [i ]
168
+ if guard is not None :
169
+ guard .accept (self )
170
+ # We already entered a block, so visit this block's statements directly
171
+ for stmt in s .bodies [i ].body :
172
+ stmt .accept (self )
174
173
175
174
def visit_capture_pattern (self , p : AsPattern ) -> None :
176
175
if p .name is not None :
You can’t perform that action at this time.
0 commit comments