summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-12-25 20:28:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-12-25 20:28:28 -0800
commit7e704a1c0d76cfef21fd27525023fe44102c83d3 (patch)
tree3516c77163144c118678df0a1ec666a5564ebafc /regex.c
parenta791cd6527f20c531898390e14f3c7c21c1d9571 (diff)
downloadtxr-7e704a1c0d76cfef21fd27525023fe44102c83d3.tar.gz
txr-7e704a1c0d76cfef21fd27525023fe44102c83d3.tar.bz2
txr-7e704a1c0d76cfef21fd27525023fe44102c83d3.zip
Bugfix: incorrect quasi-quoting over #R syntax.
The issue is that ^#R(,(+ 2 2) ,(+ 3 3)) produces 4..6 rather than #R(4..6). 4..6 is, of course, the syntax (rcons 4 6) which evaluates to a range. Here we want the range to which it evaluates, not the syntax. * eval.c (expand_qquote_rec): Handle the case when the qquoted_form is a range atom: expand the from and to parts, and generate a rcons expression. Though this seems to be opposite to the previous paragraph, it's the right thing. * parser.y (range): Drop the unquotes_occurs case which produces rcons syntax. Produce a range object, always. This is the source of the problem: a (rcons ...) expression was produced here which was just traversed by the qquote expander as list. It's the expander that must produce the rcons expression.
Diffstat (limited to 'regex.c')
0 files changed, 0 insertions, 0 deletions