From 072575259c01eba7f33e21e7a622b83ba3d88400 Mon Sep 17 00:00:00 2001 From: Abel Sen <19356702+neuroevolutus@users.noreply.github.com> Date: Tue, 24 Dec 2024 08:34:07 -0600 Subject: [PATCH] Remove unneeded `Juxt` token (#208) I started reading through the parsing code and noticed that this token was being unused. Let me know if you'd like me to make any further changes! --------- Co-authored-by: Abel Sen --- scrapscript.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scrapscript.py b/scrapscript.py index 68466c4c..8747c894 100755 --- a/scrapscript.py +++ b/scrapscript.py @@ -106,12 +106,6 @@ class RightBracket(Token): pass -@dataclass(eq=True) -class Juxt(Token): - # The space between other tokens that indicates function application. - pass - - @dataclass(eq=True) class VariantToken(Token): value: str @@ -517,7 +511,6 @@ def parse(tokens: typing.List[Token], p: float = 0) -> "Object": # TODO: revisit whether to use @ or . for field access l = Access(l, parse(tokens, pr)) else: - assert not isinstance(op, Juxt) assert isinstance(op, Operator) l = Binop(BinopKind.from_str(op.value), l, parse(tokens, pr)) return l