Files
openide/python/testData/psi/FStringTerminatedByQuoteInNestedFormatPart.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

34 lines
1.3 KiB
Plaintext

PyFile:FStringTerminatedByQuoteInNestedFormatPart.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: {f"{42:
PyFormattedStringNode
PsiElement(Py:FSTRING_START)('f'')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyStringLiteralExpression: {42:
PyFormattedStringNode
PsiElement(Py:FSTRING_START)('f"')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyNumericLiteralExpression
PsiElement(Py:INTEGER_LITERAL)('42')
PyFStringFragmentFormatPart
PsiElement(Py:FSTRING_FRAGMENT_FORMAT_START)(':')
PsiErrorElement:} expected
<empty list>
PsiErrorElement:Expected "
<empty list>
PsiElement(Py:FSTRING_END)(''')
PsiErrorElement:End of statement expected
<empty list>
PsiElement(Py:RBRACE)('}')
PsiErrorElement:Statement expected, found Py:RBRACE
<empty list>
PyExpressionStatement
PyStringLiteralExpression: }'
PsiElement(Py:SINGLE_QUOTED_STRING)('"}'')