summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-03-23 07:37:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-03-23 07:37:57 -0700
commitbf82e9cfa8fc2b627af6e2fcfcbc1bbfc61e63d9 (patch)
tree1fb96bf438be30420dcc50f376b9e5d4996a8aae /struct.c
parent5861192436b31f7377bd82cacb7acc8cc8baf4f9 (diff)
downloadtxr-bf82e9cfa8fc2b627af6e2fcfcbc1bbfc61e63d9.tar.gz
txr-bf82e9cfa8fc2b627af6e2fcfcbc1bbfc61e63d9.tar.bz2
txr-bf82e9cfa8fc2b627af6e2fcfcbc1bbfc61e63d9.zip
match: support @nil in predicates.
For instance @(<= 10 @nil 20) is a pattern which matches a number between 10 and 20, without binding a variable. * stdlib/match.tl (compile-predicate-match): Looks like this code was already halfway expressing the intent that the avar could be nil, because arg-var takes the value of avar if that is non-nil, otherwise a gensym is substituted. What was missing was that the gensym that replaces nil must also be substituted into the predicate. * tests/011/patmatch.tl: New tests. * txr.1: Document that the variable embedded in a predicate may be null.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions