Enhanced callee resolution for decorators. Tests for decorators.

This commit is contained in:
Dmitry Cheryasov
2008-12-29 07:08:07 +03:00
parent f0aefdabe6
commit 7366967bf5
13 changed files with 174 additions and 12 deletions
+5
View File
@@ -0,0 +1,5 @@
@staticmethod
@xmlize(node="foo")
def foo():
pass
+32
View File
@@ -0,0 +1,32 @@
PyFile:DecoratedFunction.py
PyFunction
PyDecoratorList
PyDecorator: @staticmethod
PsiElement(Py:AT)('@')
PyReferenceExpression: staticmethod
PsiElement(Py:IDENTIFIER)('staticmethod')
PsiWhiteSpace('\n')
PyDecorator: @xmlize
PsiElement(Py:AT)('@')
PyReferenceExpression: xmlize
PsiElement(Py:IDENTIFIER)('xmlize')
PyArgumentList
PsiElement(Py:LPAR)('(')
PyKeywordArgumentImpl: node
PsiElement(Py:IDENTIFIER)('node')
PsiElement(Py:EQ)('=')
PyStringLiteralExpression: foo
PsiElement(Py:STRING_LITERAL)('"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')