diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-07-11 22:45:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-07-11 22:45:48 -0700 |
commit | 974532041c1eaeb55c9fcb4c395e4da5f19a4773 (patch) | |
tree | 6b71ae2d02f9b6fc43b6e34fd301df1d3d30e0c8 /match.h | |
parent | afe3787a368ec6753ed9a69867b943a3238d5796 (diff) | |
download | txr-974532041c1eaeb55c9fcb4c395e4da5f19a4773.tar.gz txr-974532041c1eaeb55c9fcb4c395e4da5f19a4773.tar.bz2 txr-974532041c1eaeb55c9fcb4c395e4da5f19a4773.zip |
New :lists feature in @(collect)/@(coll).
This is for those situations when multiple lists are being
collected, and must all be bound even if empty. Yet, the
lists are independent rather than parallel, so the discipline
of :vars is too rigid.
* match.c (lists_k): New keyword symbol variable.
(h_coll, v_collect): Extract :lists argument as local variable
lists, validate that :lists is not used on @(repeat)/@(rep)
and implement logic.
(match_expand_keyword_args): Treat expansion of :lists
the same way as :vars.
(syms_init): Initialize lists_k.
* match.c (lists_k): Declared.
* txr.1: Documented.
Diffstat (limited to 'match.h')
-rw-r--r-- | match.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -27,7 +27,7 @@ extern val text_s, choose_s, gather_s, do_s, mdo_s, require_s, in_package_s; extern val close_s, load_s, include_s, mod_s, modlast_s, line_s; -extern val counter_k, vars_k, env_k, var_k, into_k, named_k; +extern val counter_k, vars_k, lists_k, env_k, var_k, into_k, named_k; val match_expand_keyword_args(val elem); val match_expand_elem(val elem); val match_filter(val name, val arg, val other_args); |