report missing identifier after 'as' (PY-9853)

This commit is contained in:
Dmitry Jemerov
2013-11-06 13:39:06 +01:00
parent 52efcb58c5
commit aa885ea720
4 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
with open("") as :
pass

View File

@@ -0,0 +1,23 @@
PyFile:WithMissingID.py
PyWithStatement
PsiElement(Py:WITH_KEYWORD)('with')
PsiWhiteSpace(' ')
PyWithItem
PyCallExpression: open
PyReferenceExpression: open
PsiElement(Py:IDENTIFIER)('open')
PyArgumentList
PsiElement(Py:LPAR)('(')
PyStringLiteralExpression:
PsiElement(Py:SINGLE_QUOTED_STRING)('""')
PsiElement(Py:RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiErrorElement:identifier expected
<empty list>
PsiWhiteSpace(' ')
PsiElement(Py:COLON)(':')
PsiWhiteSpace('\n ')
PyStatementList
PyPassStatement
PsiElement(Py:PASS_KEYWORD)('pass')