a trailing comma in argument list is not an error (PY-4016)

This commit is contained in:
Dmitry Jemerov
2011-06-28 21:26:18 +02:00
parent 5ed2aec92e
commit dba64fbcea
4 changed files with 25 additions and 0 deletions
@@ -0,0 +1,2 @@
def some_function(a,):
pass
@@ -0,0 +1,16 @@
PyFile:TrailingCommaInArgList.py
PyFunction('some_function')
PsiElement(Py:DEF_KEYWORD)('def')
PsiWhiteSpace(' ')
PsiElement(Py:IDENTIFIER)('some_function')
PyParameterList
PsiElement(Py:LPAR)('(')
PyNamedParameter('a')
PsiElement(Py:IDENTIFIER)('a')
PsiElement(Py:COMMA)(',')
PsiElement(Py:RPAR)(')')
PsiElement(Py:COLON)(':')
PsiWhiteSpace('\n ')
PyStatementList
PyPassStatement
PsiElement(Py:PASS_KEYWORD)('pass')