mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
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.
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
PyFile:FStringFragmentWithInterpolatedFormatPart.py
|
|
PyAssignmentStatement
|
|
PyTargetExpression: s
|
|
PsiElement(Py:IDENTIFIER)('s')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:EQ)('=')
|
|
PsiWhiteSpace(' ')
|
|
PyStringLiteralExpression: result: {value:{width}.{precision}}
|
|
PyFormattedStringNode
|
|
PsiElement(Py:FSTRING_START)('f'')
|
|
PsiElement(Py:FSTRING_TEXT)('result: ')
|
|
PyFStringFragment
|
|
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
|
PyReferenceExpression: value
|
|
PsiElement(Py:IDENTIFIER)('value')
|
|
PyFStringFragmentFormatPart
|
|
PsiElement(Py:FSTRING_FRAGMENT_FORMAT_START)(':')
|
|
PyFStringFragment
|
|
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
|
PyReferenceExpression: width
|
|
PsiElement(Py:IDENTIFIER)('width')
|
|
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
|
|
PsiElement(Py:FSTRING_TEXT)('.')
|
|
PyFStringFragment
|
|
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
|
PyReferenceExpression: precision
|
|
PsiElement(Py:IDENTIFIER)('precision')
|
|
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
|
|
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
|
|
PsiElement(Py:FSTRING_END)(''') |