Files
openide/python/testData/psi/FStringWithSimpleFragment.txt
Mikhail Golubev c13a63958d PY-31442 Parse simplest possible f-strings together with other expressions
- no nested f-strings
- no formatting parts after colon
- no illegal escapes detection
- no quote mismatch detection
2018-10-01 12:46:41 +03:00

18 lines
640 B
Plaintext

PyFile:FStringWithSimpleFragment.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression:
PyFormattedStringNode
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_TEXT)('bar')
PsiElement(Py:FSTRING_END)(''')