mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
parse ellipsis only in the context where it can actually be used (PY-7763)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
def a():
|
||||
... # <- highlighted as "Statement seems to have no effect"
|
||||
pass
|
||||
|
||||
a()
|
||||
@@ -0,0 +1,33 @@
|
||||
PyFile:EllipsisAsStatement.py
|
||||
PyFunction('a')
|
||||
PsiElement(Py:DEF_KEYWORD)('def')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:IDENTIFIER)('a')
|
||||
PyParameterList
|
||||
PsiElement(Py:LPAR)('(')
|
||||
PsiElement(Py:RPAR)(')')
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStatementList
|
||||
PsiElement(Py:DOT)('.')
|
||||
PsiErrorElement:Statement expected, found Py:DOT
|
||||
<empty list>
|
||||
PsiElement(Py:DOT)('.')
|
||||
PsiErrorElement:Statement expected, found Py:DOT
|
||||
<empty list>
|
||||
PsiElement(Py:DOT)('.')
|
||||
PsiErrorElement:Statement expected, found Py:DOT
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiComment(Py:END_OF_LINE_COMMENT)('# <- highlighted as "Statement seems to have no effect"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyPassStatement
|
||||
PsiElement(Py:PASS_KEYWORD)('pass')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PyExpressionStatement
|
||||
PyCallExpression: a
|
||||
PyReferenceExpression: a
|
||||
PsiElement(Py:IDENTIFIER)('a')
|
||||
PyArgumentList
|
||||
PsiElement(Py:LPAR)('(')
|
||||
PsiElement(Py:RPAR)(')')
|
||||
Reference in New Issue
Block a user