mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't parse compound statements after semicolon at top level of file (PY-7660)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
a = 0; if a:
|
||||
pass
|
||||
@@ -0,0 +1,28 @@
|
||||
PyFile:CompoundStatementAfterSemicolon.py
|
||||
PyAssignmentStatement
|
||||
PyTargetExpression: a
|
||||
PsiElement(Py:IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('0')
|
||||
PsiElement(Py:SEMICOLON)(';')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:IF_KEYWORD)('if')
|
||||
PsiErrorElement:Statement expected, found Py:IF_KEYWORD
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PyExpressionStatement
|
||||
PyReferenceExpression: a
|
||||
PsiElement(Py:IDENTIFIER)('a')
|
||||
PsiErrorElement:End of statement expected
|
||||
<empty list>
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiErrorElement:Statement expected, found Py:COLON
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiErrorElement:Unexpected indent
|
||||
<empty list>
|
||||
PyPassStatement
|
||||
PsiElement(Py:PASS_KEYWORD)('pass')
|
||||
Reference in New Issue
Block a user