diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-21 06:43:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-21 06:43:28 -0700 |
commit | 43e0e33ced93434fd32c050ab3ca68a1e7231932 (patch) | |
tree | a2d957af68b4a9cc755385404ccdb8024f0e7126 /tests | |
parent | 2dd44160458c9d8293faddf5156b9cef08eea7c0 (diff) | |
download | txr-43e0e33ced93434fd32c050ab3ca68a1e7231932.tar.gz txr-43e0e33ced93434fd32c050ab3ca68a1e7231932.tar.bz2 txr-43e0e33ced93434fd32c050ab3ca68a1e7231932.zip |
compile/eval: new operator, mac-env-param-bind.
mac-env-param-bind is like mac-param-bind but also allows
the value for the :env parameter to be specified.
* eval.c (op_mac_env_param_bind_s): New sy mbol variable.
(op_mac_env_param_bind): New static function.
(do_expand): Handle mac_env_param_bind_s.
(eval_init): Initialize symbol variable and register macro.
* share/txr/stdlib/compiler.tl (compiler compile): Add case
for mac-env-param-bind.
(compiler comp-mac-env-param-bind): New method.
* share/txr/stdlib/doc-syms.tl: Updated with new hashes for
tree-bind and mac-param-bind, and inclusion of
mac-env-param-bind.
* tests/012/binding.tl: New file.
* txr.1: Documented.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/012/binding.tl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/012/binding.tl b/tests/012/binding.tl new file mode 100644 index 00000000..59c1ff04 --- /dev/null +++ b/tests/012/binding.tl @@ -0,0 +1,5 @@ +(load "../common") + +(test + (mac-env-param-bind '(foo) 42 (:env e :form f x y) '(1 2) (list x y e f)) + (1 2 42 (foo))) |