|
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.
|