summaryrefslogtreecommitdiffstats
path: root/txr.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-02 20:25:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-02 20:25:31 -0700
commitf386692dede859e99745dae25a8f61cb1d39d940 (patch)
tree12d42f0a9aeab4f790c786a72d0dcef8f29604b9 /txr.h
parentd178ddaac5b58c3a0d8b024884859d7ef3c24386 (diff)
downloadtxr-f386692dede859e99745dae25a8f61cb1d39d940.tar.gz
txr-f386692dede859e99745dae25a8f61cb1d39d940.tar.bz2
txr-f386692dede859e99745dae25a8f61cb1d39d940.zip
matcher: quasiquote matching.
This allows (when-match ^(,a ,b) '(1 2) (list a b)) -> (1 2) which is a nice alternative that is supported by some Lisp pattern matchers. We don't need it since we have (@a @b). The motivation is JSON matching. (when-match ^#J{"foo" : {"x" : ~val}} #J{"foo" : {"x" : "y"}} val) -> "y" * share/txr/stdlib/match.tl (compile-match): Recognize qquote case and handle via transform-qquote function. (non-triv-pat-p): Let's declare quasiquotes to be nontrivial. (transform-qquote): New function: transform quasi-quoted syntax into regular pattern matching syntax. * txr.1: Documented.
Diffstat (limited to 'txr.h')
0 files changed, 0 insertions, 0 deletions