summaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-15 17:41:30 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-15 17:41:30 -0800
commit53fa77578bcc3cebf491656d3c2e7d07c7493674 (patch)
tree429937531a09627b9eafa0a4cbd20aa3eb25bdcb /ChangeLog
parent5e89795f66750094ccac9d13a1f2001dde3d1226 (diff)
downloadtxr-53fa77578bcc3cebf491656d3c2e7d07c7493674.tar.gz
txr-53fa77578bcc3cebf491656d3c2e7d07c7493674.tar.bz2
txr-53fa77578bcc3cebf491656d3c2e7d07c7493674.zip
First cut at implementation of macros.
* eval.c (top_mb, defmacro_s, macro_time_s, whole_k, env_k): New global variables. (expand_params): Recurse to handle macro parameter lists too. (bind_macro_params, op_defmacro, expand_macro): New static functions. (expand): Evaluate defmacro forms and macro-time forms at expansion time. Recognize and expand macros (albeit not yet with proper lexical scoping: local bindings are not able to shadow a macro). (eval_init): Protect top_mb from GC and initialize it. Intern new symbols defmacro, macro-time, and :whole. Register defmacro operator in op_table. * match.h (env_k): Added declaration for existing external variable.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog17
1 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bd86f3fd..9afb338c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2014-02-15 Kaz Kylheku <kaz@kylheku.com>
+ First cut at implementation of macros.
+
+ * eval.c (top_mb, defmacro_s, macro_time_s, whole_k, env_k): New global
+ variables.
+ (expand_params): Recurse to handle macro parameter lists too.
+ (bind_macro_params, op_defmacro, expand_macro): New static functions.
+ (expand): Evaluate defmacro forms and macro-time forms at expansion
+ time. Recognize and expand macros (albeit not yet with proper lexical
+ scoping: local bindings are not able to shadow a macro).
+ (eval_init): Protect top_mb from GC and initialize it.
+ Intern new symbols defmacro, macro-time, and :whole.
+ Register defmacro operator in op_table.
+
+ * match.h (env_k): Added declaration for existing external variable.
+
+2014-02-15 Kaz Kylheku <kaz@kylheku.com>
+
Bugfix: parameters of defun were not being treated by expander.
They need to be since they can contain evaluable initforms for default
arguments. Ditto with lambda; lambda parameters were being treated