From 3d1f74d8f5e7b912d9b2124ca66acdf80b7c850c Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 26 Nov 2013 08:41:01 -0800 Subject: [PATCH] add 'define-macro' core syntax --- include/picrin/macro.h | 3 ++- src/state.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/picrin/macro.h b/include/picrin/macro.h index 5dcf2c5d..1dd6cd81 100644 --- a/include/picrin/macro.h +++ b/include/picrin/macro.h @@ -17,7 +17,8 @@ struct pic_syntax { PIC_STX_QUOTE, PIC_STX_LAMBDA, PIC_STX_IF, - PIC_STX_BEGIN + PIC_STX_BEGIN, + PIC_STX_DEFMACRO } kind; pic_sym sym; }; diff --git a/src/state.c b/src/state.c index fe6c7695..68d9c891 100644 --- a/src/state.c +++ b/src/state.c @@ -132,6 +132,7 @@ pic_open(int argc, char *argv[], char **envp) register_core_syntax(pic, PIC_STX_LAMBDA, "lambda"); register_core_syntax(pic, PIC_STX_IF, "if"); register_core_syntax(pic, PIC_STX_BEGIN, "begin"); + register_core_syntax(pic, PIC_STX_DEFMACRO, "define-macro"); pic_gc_arena_restore(pic, ai); pic_init_core(pic);