Files
openide/python/testData/psi/FStringSingleSlashBeforeLeftBraceInLiteralPart.txt
Mikhail Golubev ed4b1332dc PY-32864 Automatically merge f-string text tokens
It not only makes AST of f-string nodes simpler and more obvious to work with,
but, in general, is also better supported by various platform functionality that
assumes that raw text parts of string literals are not broken into multiple
elements.

GitOrigin-RevId: 931d1ea4c09d145e763aed839dcb4acbb3e43ec7
2020-08-17 11:12:03 +00:00

17 lines
630 B
Plaintext

PyFile:FStringSingleSlashBeforeLeftBraceInLiteralPart.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: foo\{42}
PyFormattedStringElement
PsiElement(Py:FSTRING_START)('f'')
PsiElement(Py:FSTRING_TEXT)('foo\')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyNumericLiteralExpression
PsiElement(Py:INTEGER_LITERAL)('42')
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
PsiElement(Py:FSTRING_END)(''')