On 2023-08-02 17:52, Kaz Kylheku wrote:
On 2023-08-02 17:42, Kaz Kylheku wrote:
The problem is that (i 1) is repeated in the argument syntax (:counter (i 1) (i 1)) which messes up the property lists.
Other things could be affected? I haven't drilled into it beyond this finding yet.
It looks like the problem is the function expand_repeat_rep_args, which hasn't been touched since March 2017.
Yikes!
And ... it's no regression at all. It was implemented broken in March 2016.
commit e84da36197b809c50a0c43cceb5c7b27b3d5733e
Author: Kaz Kylheku <kaz@kylheku.com>
Date: Wed Mar 16 23:18:25 2016 -0700
Support binding in @(repeat)/@(rep) :vars.
* match.c (extract_bindings): Check for (var expr) syntax,
evaluate and bind.
* match.h (vars_k): Declared.
* parser.y (expand_repeat_rep_args): New static function.
(repeat_rep_helper): The :counter and :var arguments of
repeat/rep must be macro-expanded, since there can be Lisp
expressions there. This supports the new feature, but also
fixes the bug of :counter (var form) not expanding
form.
* txr.1: Updated documentation about :vars in @(repeat).