replace pic_syntax_new with pic_syntax_new_macro
This commit is contained in:
parent
a18fe136e1
commit
93a259870c
|
@ -42,8 +42,7 @@ struct pic_senv *pic_null_syntactic_env(pic_state *);
|
|||
struct pic_senv *pic_minimal_syntactic_env(pic_state *);
|
||||
struct pic_senv *pic_core_syntactic_env(pic_state *);
|
||||
|
||||
struct pic_syntax *pic_syntax_new(pic_state *, pic_sym, struct pic_proc *);
|
||||
struct pic_syntax *pic_syntax_new_macro(pic_state *, pic_sym, struct pic_proc *, struct pic_senv *);
|
||||
struct pic_syntax *pic_syntax_new(pic_state *, pic_sym, struct pic_proc *, struct pic_senv *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
16
src/macro.c
16
src/macro.c
|
@ -60,19 +60,7 @@ new_local_senv(pic_state *pic, pic_value formals, struct pic_senv *up)
|
|||
}
|
||||
|
||||
struct pic_syntax *
|
||||
pic_syntax_new(pic_state *pic, pic_sym sym, struct pic_proc *macro)
|
||||
{
|
||||
struct pic_syntax *stx;
|
||||
|
||||
stx = (struct pic_syntax *)pic_obj_alloc(pic, sizeof(struct pic_syntax), PIC_TT_SYNTAX);
|
||||
stx->sym = sym;
|
||||
stx->senv = NULL;
|
||||
stx->macro = macro;
|
||||
return stx;
|
||||
}
|
||||
|
||||
struct pic_syntax *
|
||||
pic_syntax_new_macro(pic_state *pic, pic_sym sym, struct pic_proc *macro, struct pic_senv *mac_env)
|
||||
pic_syntax_new(pic_state *pic, pic_sym sym, struct pic_proc *macro, struct pic_senv *mac_env)
|
||||
{
|
||||
struct pic_syntax *stx;
|
||||
|
||||
|
@ -152,7 +140,7 @@ defsyntax(pic_state *pic, pic_sym sym, struct pic_proc *macro, struct pic_senv *
|
|||
pic_sym uniq;
|
||||
|
||||
uniq = pic_gensym(pic, sym);
|
||||
stx = pic_syntax_new_macro(pic, sym, macro, mac_env);
|
||||
stx = pic_syntax_new(pic, sym, macro, mac_env);
|
||||
|
||||
xh_put_int(pic->lib->senv->name, sym, uniq);
|
||||
xh_put_int(pic->macros, uniq, (long)stx);
|
||||
|
|
Loading…
Reference in New Issue