mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-31442 Shorter parser error for incomplete fragments terminated by closing quotes
In these cases one probably doesn't want to either specify a type conversion character or add a format part and has just forgotten a closing brace.
This commit is contained in:
@@ -13,6 +13,6 @@ PyFile:FStringFragmentIncompleteTypeConversionBeforeClosingQuote.py
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('42')
|
||||
PsiElement(Py:FSTRING_FRAGMENT_TYPE_CONVERSION)('!')
|
||||
PsiErrorElement:: or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
@@ -12,6 +12,6 @@ PyFile:FStringIncompleteFragment.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('42')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
@@ -13,6 +13,6 @@ PyFile:FStringIncompleteFragmentWithTypeConversion.py
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('42')
|
||||
PsiElement(Py:FSTRING_FRAGMENT_TYPE_CONVERSION)('!r')
|
||||
PsiErrorElement:: or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
@@ -17,7 +17,7 @@ PyFile:FStringTerminatedByQuoteInNestedLiteralPart.py
|
||||
PsiElement(Py:FSTRING_TEXT)('baz')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiErrorElement:End of statement expected
|
||||
|
||||
@@ -16,7 +16,7 @@ PyFile:FStringTerminatedByQuoteInsideFStringLiteral.py
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"}baz'')
|
||||
@@ -21,7 +21,7 @@ PyFile:FStringTerminatedByQuoteInsideFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"}}'')
|
||||
@@ -20,7 +20,7 @@ PyFile:FStringTerminatedByQuoteInsideNestedFStringLiteral.py
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:""" expected
|
||||
<empty list>
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ PyFile:FStringTerminatedByQuoteInsideNestedFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:""" expected
|
||||
<empty list>
|
||||
|
||||
@@ -17,7 +17,7 @@ PyFile:FStringTerminatedByQuoteInsideNestedStringLiteral.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:""" expected
|
||||
<empty list>
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ PyFile:FStringTerminatedByQuoteInsideNestedStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:""" expected
|
||||
<empty list>
|
||||
|
||||
@@ -13,7 +13,7 @@ PyFile:FStringTerminatedByQuoteInsideStringLiteral.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"}baz'')
|
||||
@@ -18,7 +18,7 @@ PyFile:FStringTerminatedByQuoteInsideStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)('"}}'')
|
||||
@@ -13,7 +13,7 @@ PyFile:FStringTerminatedByQuoteOfFStringLiteral.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyReferenceExpression: f
|
||||
PsiElement(Py:IDENTIFIER)('f')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiErrorElement:End of statement expected
|
||||
|
||||
@@ -18,7 +18,7 @@ PyFile:FStringTerminatedByQuoteOfFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyReferenceExpression: f
|
||||
PsiElement(Py:IDENTIFIER)('f')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiErrorElement:End of statement expected
|
||||
|
||||
@@ -17,7 +17,7 @@ PyFile:FStringTerminatedByQuoteOfNestedFStringLiteral.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyReferenceExpression: f
|
||||
PsiElement(Py:IDENTIFIER)('f')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -23,7 +23,7 @@ PyFile:FStringTerminatedByQuoteOfNestedFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyReferenceExpression: f
|
||||
PsiElement(Py:IDENTIFIER)('f')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -17,7 +17,7 @@ PyFile:FStringTerminatedByQuoteOfNestedStringLiteral.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PsiErrorElement:expression expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -23,7 +23,7 @@ PyFile:FStringTerminatedByQuoteOfNestedStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PsiErrorElement:expression expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -13,7 +13,7 @@ PyFile:FStringTerminatedByQuoteOfStringLiteral.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PsiErrorElement:expression expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiErrorElement:End of statement expected
|
||||
|
||||
@@ -18,7 +18,7 @@ PyFile:FStringTerminatedByQuoteOfStringLiteralInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PsiErrorElement:expression expected
|
||||
<empty list>
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiErrorElement:End of statement expected
|
||||
|
||||
@@ -18,6 +18,6 @@ PyFile:FStringTrailingWhitespaceInIncompleteFragmentInFormatPart.py
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PsiErrorElement:expression expected
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:type conversion, : or } expected
|
||||
PsiErrorElement:} expected
|
||||
<empty list>
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
Reference in New Issue
Block a user