change parsing of generator in argument list so that parentheses are part of argument list, not generator (PY-3172)

This commit is contained in:
Dmitry Jemerov
2011-03-23 20:28:13 +01:00
parent 971d0aa1c3
commit db5297d5e1
7 changed files with 62 additions and 10 deletions
@@ -0,0 +1 @@
"".join(' ' for ca in comment)
@@ -0,0 +1,24 @@
PyFile:GeneratorInArgumentList.py
PyExpressionStatement
PyCallExpression: "".join
PyReferenceExpression: join
PyStringLiteralExpression:
PsiElement(Py:STRING_LITERAL)('""')
PsiElement(Py:DOT)('.')
PsiElement(Py:IDENTIFIER)('join')
PyArgumentList
PsiElement(Py:LPAR)('(')
PyGeneratorExpression
PyStringLiteralExpression:
PsiElement(Py:STRING_LITERAL)('' '')
PsiWhiteSpace(' ')
PsiElement(Py:FOR_KEYWORD)('for')
PsiWhiteSpace(' ')
PyTargetExpression: ca
PsiElement(Py:IDENTIFIER)('ca')
PsiWhiteSpace(' ')
PsiElement(Py:IN_KEYWORD)('in')
PsiWhiteSpace(' ')
PyReferenceExpression: comment
PsiElement(Py:IDENTIFIER)('comment')
PsiElement(Py:RPAR)(')')