importing 'with_statement' not as first in list (demonstrative case for PY-1).

This commit is contained in:
Dmitry Cheryasov
2008-04-11 16:23:23 +04:00
parent 42249bb6a0
commit 0720d546e9
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
# with = 1 # legal identifier
# with = 1
with = 1
# from __future__ import with_statement, nested_scopes
from __future__ import with_statement, nested_scopes
# from __future__ import nested_scopes, with_statement
from __future__ import nested_scopes, with_statement
# with x.y(z)[t] as y: pass
with x.y(z)[t] as y: pass
# with = 1 # now illegal
+5 -5
View File
@@ -12,7 +12,7 @@ PyFile:WithStatement2.py
PyNumericLiteralExpression
PsiElement(Py:INTEGER_LITERAL)('1')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# from __future__ import with_statement, nested_scopes')
PsiComment(Py:END_OF_LINE_COMMENT)('# from __future__ import nested_scopes, with_statement')
PsiWhiteSpace('\n')
PyFromImportStatement
PsiElement(Py:FROM_KEYWORD)('from')
@@ -23,13 +23,13 @@ PyFile:WithStatement2.py
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement
PyReferenceExpression: with_statement
PsiElement(Py:IDENTIFIER)('with_statement')
PyReferenceExpression: nested_scopes
PsiElement(Py:IDENTIFIER)('nested_scopes')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement
PyReferenceExpression: nested_scopes
PsiElement(Py:IDENTIFIER)('nested_scopes')
PyReferenceExpression: with_statement
PsiElement(Py:IDENTIFIER)('with_statement')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# with x.y(z)[t] as y: pass')
PsiWhiteSpace('\n')