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

25 lines
954 B
Plaintext

PyFile:FStringFragmentWithNotParenthesizedLambda.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: {lambda x: 42}
PyFormattedStringNode
PsiElement(Py:FSTRING_START)('f'')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyLambdaExpression
PsiElement(Py:LAMBDA_KEYWORD)('lambda')
PsiWhiteSpace(' ')
PyParameterList
PyNamedParameter('x')
PsiElement(Py:IDENTIFIER)('x')
PsiErrorElement:',' or '(' or ')' expected
<empty list>
PyFStringFragmentFormatPart
PsiElement(Py:FSTRING_FRAGMENT_FORMAT_START)(':')
PsiElement(Py:FSTRING_TEXT)(' 42')
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
PsiElement(Py:FSTRING_END)(''')