fixed PY-8948 Not closed quote in subscription breaks parsing for the whole file

This commit is contained in:
Ekaterina Tuzova
2013-02-21 18:44:46 +04:00
parent c024597491
commit 60d0628886
4 changed files with 43 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
a["key""]"
if True:
pass
+25
View File
@@ -0,0 +1,25 @@
PyFile:NotClosedSlice.py
PyExpressionStatement
PyConditionalExpression
PySubscriptionExpression
PyReferenceExpression: a
PsiElement(Py:IDENTIFIER)('a')
PsiElement(Py:LBRACKET)('[')
PyConditionalExpression
PyStringLiteralExpression: key]
PsiElement(Py:SINGLE_QUOTED_STRING)('"key"')
PsiElement(Py:SINGLE_QUOTED_STRING)('"]"')
PsiErrorElement:']' expected
<empty list>
PsiWhiteSpace('\n')
PyIfStatement
PyIfPartIf
PsiElement(Py:IF_KEYWORD)('if')
PsiWhiteSpace(' ')
PyReferenceExpression: True
PsiElement(Py:IDENTIFIER)('True')
PsiElement(Py:COLON)(':')
PsiWhiteSpace('\n ')
PyStatementList
PyPassStatement
PsiElement(Py:PASS_KEYWORD)('pass')