| PyFile:WithStatement2.py | |
| PsiComment(Py:END_OF_LINE_COMMENT)('# with = 1 # legal identifier') | |
| PsiWhiteSpace('\n') | |
| PsiComment(Py:END_OF_LINE_COMMENT)('# with = 1') | |
| PsiWhiteSpace('\n') | |
| PyAssignmentStatement | |
| PyTargetExpression: with | |
| PsiElement(Py:IDENTIFIER)('with') | |
| PsiWhiteSpace(' ') | |
| PsiElement(Py:EQ)('=') | |
| PsiWhiteSpace(' ') | |
| PyNumericLiteralExpression | |
| PsiElement(Py:INTEGER_LITERAL)('1') | |
| PsiWhiteSpace('\n') | |
| PsiComment(Py:END_OF_LINE_COMMENT)('# from __future__ import nested_scopes, with_statement') | |
| PsiWhiteSpace('\n') | |
| PyFromImportStatement | |
| PsiElement(Py:FROM_KEYWORD)('from') | |
| PsiWhiteSpace(' ') | |
| PyReferenceExpression: __future__ | |
| PsiElement(Py:IDENTIFIER)('__future__') | |
| PsiWhiteSpace(' ') | |
| PsiElement(Py:IMPORT_KEYWORD)('import') | |
| PsiWhiteSpace(' ') | |
| PyImportElement:nested_scopes | |
| PyReferenceExpression: nested_scopes | |
| PsiElement(Py:IDENTIFIER)('nested_scopes') | |
| PsiElement(Py:COMMA)(',') | |
| PsiWhiteSpace(' ') | |
| PyImportElement:with_statement | |
| 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') | |
| PyWithStatement | |
| PsiElement(Py:WITH_KEYWORD)('with') | |
| PsiWhiteSpace(' ') | |
| PyWithItem | |
| PySubscriptionExpression | |
| PyCallExpression: x.y | |
| PyReferenceExpression: y | |
| PyReferenceExpression: x | |
| PsiElement(Py:IDENTIFIER)('x') | |
| PsiElement(Py:DOT)('.') | |
| PsiElement(Py:IDENTIFIER)('y') | |
| PyArgumentList | |
| PsiElement(Py:LPAR)('(') | |
| PyReferenceExpression: z | |
| PsiElement(Py:IDENTIFIER)('z') | |
| PsiElement(Py:RPAR)(')') | |
| PsiElement(Py:LBRACKET)('[') | |
| PyReferenceExpression: t | |
| PsiElement(Py:IDENTIFIER)('t') | |
| PsiElement(Py:RBRACKET)(']') | |
| PsiWhiteSpace(' ') | |
| PsiElement(Py:AS_KEYWORD)('as') | |
| PsiWhiteSpace(' ') | |
| PyTargetExpression: y | |
| PsiElement(Py:IDENTIFIER)('y') | |
| PsiElement(Py:COLON)(':') | |
| PsiWhiteSpace(' ') | |
| PyStatementList | |
| PyPassStatement | |
| PsiElement(Py:PASS_KEYWORD)('pass') | |
| PsiWhiteSpace('\n') | |
| PsiComment(Py:END_OF_LINE_COMMENT)('# with = 1 # now illegal') | |
| PsiWhiteSpace('\n') | |
| PyWithStatement | |
| PsiElement(Py:WITH_KEYWORD)('with') | |
| PsiWhiteSpace(' ') | |
| PyWithItem | |
| PsiErrorElement:expression expected | |
| <empty list> | |
| PsiErrorElement:Colon expected | |
| PsiElement(Py:EQ)('=') | |
| PsiWhiteSpace(' ') | |
| PsiElement(Py:INTEGER_LITERAL)('1') | |
| PyStatementList | |
| <empty list> |