Skip to content

Commit

Permalink
Remove unneeded Juxt token
Browse files Browse the repository at this point in the history
  • Loading branch information
Abel Sen authored and Abel Sen committed Dec 22, 2024
1 parent 89e38bf commit d54f187
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions scrapscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -394,8 +388,6 @@ def parse(tokens: typing.List[Token], p: float = 0) -> "Object":
# we can match variants in MatchFunction
# It needs to be higher than the precedence of the && operator so that
# we can use #true() and #false() in boolean expressions
# It needs to be higher than the precedence of juxtaposition so that
# f #true() #false() is parsed as f(TRUE)(FALSE)
l = Variant(token.value, parse(tokens, PS[""].pr + 1))
elif isinstance(token, BytesLit):
base = token.base
Expand Down Expand Up @@ -517,7 +509,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
Expand Down

0 comments on commit d54f187

Please sign in to comment.