Files
openide/python/testData/psi/FStringBackslashBeforeExpression.txt
Mikhail Golubev 77e47676b4 PY-31442 Better recovery inside expression fragments
Including cases when there is a dangling backslash inside an expression.
2018-10-01 12:46:44 +03:00

20 lines
741 B
Plaintext

PyFile:FStringBackslashBeforeExpression.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: foo{\ 42}bar
PyFormattedStringNode
PsiElement(Py:FSTRING_START)('f'')
PsiElement(Py:FSTRING_TEXT)('foo')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PsiErrorElement:expression expected
PsiElement(Py:BACKSLASH)('\')
PsiWhiteSpace(' ')
PsiElement(Py:INTEGER_LITERAL)('42')
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
PsiElement(Py:FSTRING_TEXT)('bar')
PsiElement(Py:FSTRING_END)(''')