Files
openide/python/testData/psi/TemplateStringWithFragment.txt
Daniil Kalinin bc182ae806 PY-79967 Add a couple of tests for template strings to PythonParsingTest
GitOrigin-RevId: b760b2c6a0aa93118971c005a7ebe680d0c5000c
2025-05-09 11:12:01 +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)(''')