mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better parser error recovery for keyword as default argument value (PY-3713)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
def select2(self, fields=from):
|
||||
pass
|
||||
@@ -0,0 +1,22 @@
|
||||
PyFile:KeywordAsDefaultParameterValue.py
|
||||
PyFunction('select2')
|
||||
PsiElement(Py:DEF_KEYWORD)('def')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:IDENTIFIER)('select2')
|
||||
PyParameterList
|
||||
PsiElement(Py:LPAR)('(')
|
||||
PyNamedParameter('self')
|
||||
PsiElement(Py:IDENTIFIER)('self')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PyNamedParameter('fields')
|
||||
PsiElement(Py:IDENTIFIER)('fields')
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiErrorElement:expression expected
|
||||
PsiElement(Py:FROM_KEYWORD)('from')
|
||||
PsiElement(Py:RPAR)(')')
|
||||
PsiElement(Py:COLON)(':')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStatementList
|
||||
PyPassStatement
|
||||
PsiElement(Py:PASS_KEYWORD)('pass')
|
||||
Reference in New Issue
Block a user