Files
openide/python/testData/psi/FStringPlainInsideRawFString.txt
Mikhail Golubev be2d55e603 PY-32123 Ignore escape sequences in raw f-strings by adding special token type for their text
GitOrigin-RevId: 0b15201c60ac56daa45f22bb5ff3c1f8836efee3
2020-01-28 16:04:27 +00:00

22 lines
805 B
Plaintext

PyFile:FStringPlainInsideRawFString.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: foo{f"\n"}bar\n
PyFormattedStringElement
PsiElement(Py:FSTRING_START)('rf'')
PsiElement(Py:FSTRING_RAW_TEXT)('foo')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyStringLiteralExpression:
PyFormattedStringElement
PsiElement(Py:FSTRING_START)('f"')
PsiElement(Py:FSTRING_TEXT)('\n')
PsiElement(Py:FSTRING_END)('"')
PsiElement(Py:FSTRING_FRAGMENT_END)('}')
PsiElement(Py:FSTRING_RAW_TEXT)('bar\n')
PsiElement(Py:FSTRING_END)(''')