mirror of
https://github.com/davidhalter/parso.git
synced 2026-03-05 14:44:35 +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):
|
def is_issue(self, leaf):
|
||||||
in_loop = False
|
in_loop = False
|
||||||
for block in self._normalizer.context.blocks:
|
for block in self._normalizer.context.blocks:
|
||||||
if block.type == 'for_stmt':
|
if block.type in ('for_stmt', 'while_stmt'):
|
||||||
in_loop = True
|
in_loop = True
|
||||||
if block.type == 'try_stmt':
|
if block.type == 'try_stmt':
|
||||||
last_block = block.children[-3]
|
last_block = block.children[-3]
|
||||||
|
|||||||
Reference in New Issue
Block a user