mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 09:12:22 +07:00
Allows to use any expression as a decorator GitOrigin-RevId: e92af1ebd2c4d7024971fd4542bfe52640faaa26
68 lines
2.1 KiB
Plaintext
68 lines
2.1 KiB
Plaintext
PyFile:DecoratedAsyncDef.py
|
|
PyFunction('bar')
|
|
PyDecoratorList
|
|
PyDecorator: @foo
|
|
PsiElement(Py:AT)('@')
|
|
PyReferenceExpression: foo
|
|
PsiElement(Py:IDENTIFIER)('foo')
|
|
PsiWhiteSpace('\n')
|
|
PsiElement(Py:ASYNC_KEYWORD)('async')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:DEF_KEYWORD)('def')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IDENTIFIER)('bar')
|
|
PyParameterList
|
|
PsiElement(Py:LPAR)('(')
|
|
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 ')
|
|
PyReturnStatement
|
|
PsiElement(Py:RETURN_KEYWORD)('return')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('0')
|
|
PsiWhiteSpace('\n\n\n')
|
|
PyFunction('quux')
|
|
PyDecoratorList
|
|
PyDecorator: @baz
|
|
PsiElement(Py:AT)('@')
|
|
PyCallExpression: baz
|
|
PyReferenceExpression: baz
|
|
PsiElement(Py:IDENTIFIER)('baz')
|
|
PyArgumentList
|
|
PsiElement(Py:LPAR)('(')
|
|
PyReferenceExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiElement(Py:COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: y
|
|
PsiElement(Py:IDENTIFIER)('y')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n')
|
|
PsiElement(Py:ASYNC_KEYWORD)('async')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:DEF_KEYWORD)('def')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IDENTIFIER)('quux')
|
|
PyParameterList
|
|
PsiElement(Py:LPAR)('(')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace('\n ')
|
|
PyStatementList
|
|
PyReturnStatement
|
|
PsiElement(Py:RETURN_KEYWORD)('return')
|
|
PsiWhiteSpace(' ')
|
|
PyPrefixExpression
|
|
PsiElement(Py:AWAIT_KEYWORD)('await')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x') |