Files
openide/python/testData/psi/IncompleteFStringFragmentRecoveryStoppedAtStatementOnlyKeyword.txt
Mikhail Golubev b3351b941e PY-59594 PEP 701: Stop recovery of incomplete f-string fragments at statement-only keywords
(cherry picked from commit 7aa912a43d63f6c9867d772e120c5b45adb10be3)

IJ-MR-115763

GitOrigin-RevId: ca6909a8e7a59e06eae69b631160e4d48541ce58
2023-09-29 09:33:45 +00:00

33 lines
1.1 KiB
Plaintext

PyFile:IncompleteFStringFragmentRecoveryStoppedAtStatementOnlyKeyword.py
PyAssignmentStatement
PyTargetExpression: s
PsiElement(Py:IDENTIFIER)('s')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyStringLiteralExpression: {foo'
print(42)
PyFormattedStringElement
PsiElement(Py:FSTRING_START)('f'')
PyFStringFragment
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
PyReferenceExpression: foo
PsiElement(Py:IDENTIFIER)('foo')
PsiErrorElement:Unexpected expression part
PsiElement(Py:SINGLE_QUOTED_STRING)(''')
PsiWhiteSpace('\n')
PsiElement(Py:IDENTIFIER)('print')
PsiElement(Py:LPAR)('(')
PsiElement(Py:INTEGER_LITERAL)('42')
PsiElement(Py:RPAR)(')')
PsiWhiteSpace('\n')
PsiErrorElement:Type conversion, ':' or '}' expected
<empty list>
PsiErrorElement:' expected
<empty list>
PyRaiseStatement
PsiElement(Py:RAISE_KEYWORD)('raise')
PsiWhiteSpace(' ')
PyReferenceExpression: Exception
PsiElement(Py:IDENTIFIER)('Exception')