mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
Not stopping at a statement break token and continuing recovery until a colon, we considered the subsequent well-formed case clause to be a part of an error message about a missing pattern, thus, moving the caret to its colon. GitOrigin-RevId: f4ee0e12876960e989de3dee89925b65e3cf2339
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
PyFile:PatternMatchingRecoveryNoPatternAfterCaseInIntermediateCaseClause.py
|
|
PyMatchStatement
|
|
PsiElement(Py:MATCH_KEYWORD)('match')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace('\n ')
|
|
PyCaseClause
|
|
PsiElement(Py:CASE_KEYWORD)('case')
|
|
PsiWhiteSpace(' ')
|
|
PyLiteralPattern
|
|
PyBoolLiteralExpression
|
|
PsiElement(Py:TRUE_KEYWORD)('True')
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace('\n ')
|
|
PyStatementList
|
|
PyPassStatement
|
|
PsiElement(Py:PASS_KEYWORD)('pass')
|
|
PsiWhiteSpace('\n ')
|
|
PyCaseClause
|
|
PsiElement(Py:CASE_KEYWORD)('case')
|
|
PsiErrorElement:Pattern expected
|
|
<empty list>
|
|
PsiErrorElement:':' expected
|
|
<empty list>
|
|
PsiWhiteSpace('\n ')
|
|
PyStatementList
|
|
PsiErrorElement:Indent expected
|
|
<empty list>
|
|
PyCaseClause
|
|
PsiElement(Py:CASE_KEYWORD)('case')
|
|
PsiWhiteSpace(' ')
|
|
PyLiteralPattern
|
|
PyBoolLiteralExpression
|
|
PsiElement(Py:TRUE_KEYWORD)('True')
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace('\n ')
|
|
PyStatementList
|
|
PyPassStatement
|
|
PsiElement(Py:PASS_KEYWORD)('pass') |