Skip to content

Commit

Permalink
Don't silently discard prefixes
Browse files Browse the repository at this point in the history
Tag kwarg prefixes were ignored when the value was a Pack. Now it's an error.
  • Loading branch information
gilch committed Dec 22, 2023
1 parent f9f2c80 commit 8eb0222
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hissp/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ def _custom_macro(self, form, tag: str, extras):
1,
):
if type(v) is Pack:
if k:
raise SyntaxError(
f"Can't apply prefix {k}= to {v}.", self.position(self._pos)
)
args.extend(v.args)
kwargs.update(v.kwargs)
elif k == "*":
Expand Down

0 comments on commit 8eb0222

Please sign in to comment.