Files
openide/python/testData/psi/DecoratedFunction.txt
Lada Gagina 2e617b803c IDEA-CR-63687: PY-41305 Add PEP 614 support
Allows to use any expression as a decorator

GitOrigin-RevId: e92af1ebd2c4d7024971fd4542bfe52640faaa26
2020-06-17 00:30:49 +03:00

33 lines
1.1 KiB
Plaintext

PyFile:DecoratedFunction.py
PyFunction('foo')
PyDecoratorList
PyDecorator: @staticmethod
PsiElement(Py:AT)('@')
PyReferenceExpression: staticmethod
PsiElement(Py:IDENTIFIER)('staticmethod')
PsiWhiteSpace('\n')
PyDecorator: @xmlize
PsiElement(Py:AT)('@')
PyCallExpression: xmlize
PyReferenceExpression: xmlize
PsiElement(Py:IDENTIFIER)('xmlize')
PyArgumentList
PsiElement(Py:LPAR)('(')
PyKeywordArgumentImpl: node
PsiElement(Py:IDENTIFIER)('node')
PsiElement(Py:EQ)('=')
PyStringLiteralExpression: foo
PsiElement(Py:SINGLE_QUOTED_STRING)('"foo"')
PsiElement(Py:RPAR)(')')
PsiWhiteSpace('\n')
PsiElement(Py:DEF_KEYWORD)('def')
PsiWhiteSpace(' ')
PsiElement(Py:IDENTIFIER)('foo')
PyParameterList
PsiElement(Py:LPAR)('(')
PsiElement(Py:RPAR)(')')
PsiElement(Py:COLON)(':')
PsiWhiteSpace('\n ')
PyStatementList
PyPassStatement
PsiElement(Py:PASS_KEYWORD)('pass')