summaryrefslogtreecommitdiffstats
path: root/eval.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-22 01:56:34 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-22 01:56:34 -0800
commit3dc63192610416b6f5765171bceff5bb1f36e701 (patch)
treeb707f4f3ff5969a2b8333a2a1381ea2c8a798ebb /eval.h
parentdebcf6f76029eec890192e8ee5b040b47120f91b (diff)
downloadtxr-3dc63192610416b6f5765171bceff5bb1f36e701.tar.gz
txr-3dc63192610416b6f5765171bceff5bb1f36e701.tar.bz2
txr-3dc63192610416b6f5765171bceff5bb1f36e701.zip
Preparation for lexical macros: we need to pass a macro
environment down through the expander call hierarchy. * eval.c (expand_opt_params, expand_params, expand_tree_cases, expand_tree_case, expand_forms, val expand_cond_pairs, val expand_place, expand_qquote, expand_vars, expand_quasi, expand_op, expand_catch_clause, expand_catch, expand): All expanders get new parameter, menv. expand_forms and expand handle a nil value of menv. (eval_intrinsic): Pass nil macro environment to expand. (eval_init): Update intrinsic registration for expand. * eval.h (expand, expand_forms): Declarations updated. * parser.y (expand_meta): Gets macro env parameter. (elem, o_elem, exprs, expr): Pass nil to expand_forms and expand_meta.
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.h b/eval.h
index 713f50b8..83c885e9 100644
--- a/eval.h
+++ b/eval.h
@@ -40,8 +40,8 @@ val apply(val fun, val arglist, val ctx_form);
val eval_progn(val forms, val env, val ctx_form);
val eval(val form, val env, val ctx_form);
val eval_intrinsic(val form, val env);
-val expand(val form);
-val expand_forms(val forms);
+val expand(val form, val menv);
+val expand_forms(val forms, val menv);
val bindable(val obj);
val mapcarv(val fun, val list_of_lists);
val generate(val while_pred, val gen_fun);