Files
openide/python/testData/psi/FStringTerminatedByQuoteInsideFStringLiteral.txt
Mikhail Golubev cd3122c7c1 PY-31442 Implement "rich" methods of PyFormattedStringNode including decoding
Also fixed the problem that whitespaces inside literal parts of f-strings were
matched as PsiWhitespaces instead of FSTRING_TEXT tokens and updated all relevant
test data.
2018-10-01 12:46:42 +03:00

22 lines
817 B
Plaintext

PyFile:FStringTerminatedByQuoteInsideFStringLiteral.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: foo{f"}baz'
PyFormattedStringNode
PsiElement(Py:FSTRING_START)('f'')
PsiElement(Py:FSTRING_TEXT)('foo')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyStringLiteralExpression:
PyFormattedStringNode
PsiElement(Py:FSTRING_START)('f"')
PsiErrorElement:Expected "
<empty list>
PsiErrorElement:type conversion, : or } expected
<empty list>
PsiElement(Py:FSTRING_END)(''')
PsiElement(Py:SINGLE_QUOTED_STRING)('"}baz'')