mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-28 13:52:30 +08:00
Fix an issue with continue error detection.
This commit is contained in:
@@ -434,7 +434,7 @@ class _ContinueChecks(SyntaxRule):
|
||||
def is_issue(self, leaf):
|
||||
in_loop = False
|
||||
for block in self._normalizer.context.blocks:
|
||||
if block.type == 'for_stmt':
|
||||
if block.type in ('for_stmt', 'while_stmt'):
|
||||
in_loop = True
|
||||
if block.type == 'try_stmt':
|
||||
last_block = block.children[-3]
|
||||
|
||||
Reference in New Issue
Block a user