mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-31442 Add a test on parsing of empty f-strings
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
s = (f'',
|
||||
F"",
|
||||
rf"""""",
|
||||
FR'''''',
|
||||
)
|
||||
@@ -0,0 +1,35 @@
|
||||
PyFile:EmptyFStrings.py
|
||||
PyAssignmentStatement
|
||||
PyTargetExpression: s
|
||||
PsiElement(Py:IDENTIFIER)('s')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyParenthesizedExpression
|
||||
PsiElement(Py:LPAR)('(')
|
||||
PyTupleExpression
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PsiElement(Py:FSTRING_START)('F"')
|
||||
PsiElement(Py:FSTRING_END)('"')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PsiElement(Py:FSTRING_START)('rf"""')
|
||||
PsiElement(Py:FSTRING_END)('"""')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PsiElement(Py:FSTRING_START)('FR'''')
|
||||
PsiElement(Py:FSTRING_END)(''''')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(Py:RPAR)(')')
|
||||
Reference in New Issue
Block a user