diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-26 06:45:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-26 06:45:02 -0700 |
commit | c1b0740f9350775b4965e0547a115dc0f31e3ed2 (patch) | |
tree | 692b858fdc657fa1d4d5c0b8df1ac145f3b7335d /share/txr/stdlib/match.tl | |
parent | f28ccd1afb2a87c7ac8dfef2f43397bff5d1df97 (diff) | |
download | txr-c1b0740f9350775b4965e0547a115dc0f31e3ed2.tar.gz txr-c1b0740f9350775b4965e0547a115dc0f31e3ed2.tar.bz2 txr-c1b0740f9350775b4965e0547a115dc0f31e3ed2.zip |
matcher: diagnose unhandled quasiliteral cases.
* share/txr/stdlib/match.tl (expand-quasi-match): Close the
gap in the expander by diagnosing all unhandled syntax.
There is now enough useful functionality and stability to
start documenting the feature.
Diffstat (limited to 'share/txr/stdlib/match.tl')
-rw-r--r-- | share/txr/stdlib/match.tl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/txr/stdlib/match.tl b/share/txr/stdlib/match.tl index 514b06c6..f429a9c9 100644 --- a/share/txr/stdlib/match.tl +++ b/share/txr/stdlib/match.tl @@ -950,7 +950,12 @@ . @rest) (compile-error *match-form* "consecutive unbound variables ~s and ~s" - sym0 sym1))))) + sym0 sym1)) + ((@bad . @rest) (compile-error *match-form* + "unsupported syntax ~s" + ^(sys:quasi ,bad))) + (@else (compile-error *match-form* "bad quasiliteral syntax"))))) + (with-gensyms (str pos) ^@(and @(require (sys:var ,str) (stringp ,str)) |