mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
Instead, parse them as usual and later report in the dedicated AssignTargetAnnotator and TypeAnnotationTargetAnnotator. This way, a PsiError element appearing in the PSI tree of a type declaration statement doesn't cause PyAstTypeDeclarationStatement.getTarget nullability contract violation. GitOrigin-RevId: a3e90088cfac7938c398d4d293a72dbd127a2cd0
63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
PyFile:Await.py
|
|
PyFunction('f')
|
|
PsiElement(Py:ASYNC_KEYWORD)('async')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:DEF_KEYWORD)('def')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IDENTIFIER)('f')
|
|
PyParameterList
|
|
PsiElement(Py:LPAR)('(')
|
|
PyNamedParameter('x')
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace('\n ')
|
|
PyStatementList
|
|
PyExpressionStatement
|
|
PyPrefixExpression
|
|
PsiElement(Py:AWAIT_KEYWORD)('await')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiWhiteSpace('\n\n\n')
|
|
PyFunction('g')
|
|
PsiElement(Py:ASYNC_KEYWORD)('async')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:DEF_KEYWORD)('def')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IDENTIFIER)('g')
|
|
PyParameterList
|
|
PsiElement(Py:LPAR)('(')
|
|
PyNamedParameter('y')
|
|
PsiElement(Py:IDENTIFIER)('y')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace('\n ')
|
|
PyStatementList
|
|
PyAssignmentStatement
|
|
PyPrefixExpression
|
|
PsiElement(Py:AWAIT_KEYWORD)('await')
|
|
PsiWhiteSpace(' ')
|
|
PyTargetExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:EQ)('=')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('5')
|
|
PsiWhiteSpace('\n ')
|
|
PyExpressionStatement
|
|
PyPrefixExpression
|
|
PsiElement(Py:AWAIT_KEYWORD)('await')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: y
|
|
PsiElement(Py:IDENTIFIER)('y')
|
|
PsiWhiteSpace('\n\n\n')
|
|
PyAssignmentStatement
|
|
PyTargetExpression: await
|
|
PsiElement(Py:IDENTIFIER)('await')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:EQ)('=')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('1') |