Files
openide/python/testData/psi/TemplateStringWithFragment.txt
Daniil Kalinin b47b5beb3d PY-79967 Add a couple of tests for template strings to PythonParsingTest
GitOrigin-RevId: df2ec2ac92e21fb307cb17f446c2e5eca8e09eb3
2025-05-07 15:14:42 +00:00

18 lines
654 B
Plaintext

PyFile:TemplateStringWithFragment.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: foo{42}bar
PyFormattedStringElement
PsiElement(Py:FSTRING_START)('t'')
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_TEXT)('bar')
PsiElement(Py:FSTRING_END)(''')