summaryrefslogtreecommitdiffstats
path: root/genvmop.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-05-31 20:11:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-05-31 20:11:55 -0700
commiteed8a92921ff3ce55c845d03d5e0bf49a4b395d8 (patch)
treeecccf68bde418cec533c6b480cae00c6441ab631 /genvmop.txr
parent661531cdc4529078c15c222fafe2da025c02591d (diff)
downloadtxr-eed8a92921ff3ce55c845d03d5e0bf49a4b395d8.tar.gz
txr-eed8a92921ff3ce55c845d03d5e0bf49a4b395d8.tar.bz2
txr-eed8a92921ff3ce55c845d03d5e0bf49a4b395d8.zip
load: now passes args via *load-args*
We can give additional arguments to load, which become arguments of the script, which it can retrieve via the *load-args* special variable. * eval.c (load_args_s): New symbol variable. (loadv): New function, taking over the implementation of load. This takes variadic arguments. Loadv binds the *load-args* variable from the list of variadic arguments. (load): Reduced to wrapper around loadv. (rt_load_for): Each clause in load for can now have arguments after the target name. If that file needs to be loaded, then the arguments are passed. (me_load_for): The macro expander for the load-for macro needs to allow for the load-arg expressions and generate code which passes them to sys:rt-load-for. They all get evaluated. (eval-init): Initialize load_args_s and register the *load-args* variable. Update registration of intrinsic function load to use loadv. * tests/019/load-ret.tl, * tests/019/load-ret/module.tl, * tests/019/load-ret/module2.tl: New files. * txr.1: Documented.
Diffstat (limited to 'genvmop.txr')
0 files changed, 0 insertions, 0 deletions