mirror of
https://github.com/davidhalter/parso.git
synced 2026-04-26 09:26:01 +08:00
Use strings as a non-terminal symbol in all grammars
This makes it easier to write the same logic for all Python versions
This commit is contained in:
@@ -262,6 +262,15 @@ class String(Literal):
|
||||
return match.group(2)[:-len(match.group(1))]
|
||||
|
||||
|
||||
class FStringString(Leaf):
|
||||
"""
|
||||
f-strings contain f-string expressions and normal python strings. These are
|
||||
the string parts of f-strings.
|
||||
"""
|
||||
type = 'fstring_string'
|
||||
__slots__ = ()
|
||||
|
||||
|
||||
class _StringComparisonMixin(object):
|
||||
def __eq__(self, other):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user