mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 09:12:22 +07:00
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
17 lines
630 B
Plaintext
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)(''') |