summaryrefslogtreecommitdiffstats
path: root/match.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-16 23:18:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-03-16 23:18:25 -0700
commite84da36197b809c50a0c43cceb5c7b27b3d5733e (patch)
tree49ea25ca1b9299ae9c5c6b978a05a8d48e552f4b /match.h
parentc1e94e69d1bea54330bd94371b101828b31e9add (diff)
downloadtxr-e84da36197b809c50a0c43cceb5c7b27b3d5733e.tar.gz
txr-e84da36197b809c50a0c43cceb5c7b27b3d5733e.tar.bz2
txr-e84da36197b809c50a0c43cceb5c7b27b3d5733e.zip
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).
Diffstat (limited to 'match.h')
-rw-r--r--match.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.h b/match.h
index 2b2547fa..ebae051c 100644
--- a/match.h
+++ b/match.h
@@ -26,7 +26,7 @@
extern val text_s, choose_s, gather_s, do_s, require_s;
extern val close_s, load_s, include_s, mod_s, modlast_s, line_s;
-extern val counter_k, env_k, var_k;
+extern val counter_k, vars_k, env_k, var_k;
val match_filter(val name, val arg, val other_args);
val match_fun(val name, val args, val input, val files);
val include(val specline);