add (picrin base macro) primitives
This commit is contained in:
parent
6b01f36914
commit
f70b6c5240
|
@ -1,7 +1,7 @@
|
||||||
(define-library (picrin base)
|
(define-library (picrin base)
|
||||||
(import (rename (picrin base core) (define define*))
|
(import (rename (picrin base core) (define define*))
|
||||||
(scheme base)
|
(picrin base macro)
|
||||||
(picrin macro))
|
(scheme base))
|
||||||
|
|
||||||
(define-syntax define
|
(define-syntax define
|
||||||
(lambda (form use-env mac-env)
|
(lambda (form use-env mac-env)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
(define-library (picrin macro)
|
(define-library (picrin macro)
|
||||||
(import (picrin base)
|
(import (picrin base)
|
||||||
|
(picrin base macro)
|
||||||
(scheme base)
|
(scheme base)
|
||||||
(picrin dictionary))
|
(picrin dictionary))
|
||||||
|
|
||||||
|
@ -128,7 +129,9 @@
|
||||||
(cons (cdr formal)
|
(cons (cdr formal)
|
||||||
body)))))))
|
body)))))))
|
||||||
|
|
||||||
(export identifier=?
|
(export identifier?
|
||||||
|
identifier=?
|
||||||
|
make-identifier
|
||||||
make-syntactic-closure
|
make-syntactic-closure
|
||||||
close-syntax
|
close-syntax
|
||||||
capture-syntactic-environment
|
capture-syntactic-environment
|
||||||
|
|
|
@ -479,12 +479,15 @@ pic_macro_make_identifier(pic_state *pic)
|
||||||
void
|
void
|
||||||
pic_init_macro(pic_state *pic)
|
pic_init_macro(pic_state *pic)
|
||||||
{
|
{
|
||||||
|
pic_deflibrary (pic, "(picrin base macro)") {
|
||||||
|
pic_defun(pic, "identifier?", pic_macro_identifier_p);
|
||||||
|
pic_defun(pic, "make-identifier", pic_macro_make_identifier);
|
||||||
|
}
|
||||||
|
|
||||||
pic_deflibrary (pic, "(picrin macro)") {
|
pic_deflibrary (pic, "(picrin macro)") {
|
||||||
pic_defun(pic, "gensym", pic_macro_gensym);
|
pic_defun(pic, "gensym", pic_macro_gensym);
|
||||||
pic_defun(pic, "ungensym", pic_macro_ungensym);
|
pic_defun(pic, "ungensym", pic_macro_ungensym);
|
||||||
pic_defun(pic, "macroexpand", pic_macro_macroexpand);
|
pic_defun(pic, "macroexpand", pic_macro_macroexpand);
|
||||||
pic_defun(pic, "macroexpand-1", pic_macro_macroexpand_1);
|
pic_defun(pic, "macroexpand-1", pic_macro_macroexpand_1);
|
||||||
pic_defun(pic, "identifier?", pic_macro_identifier_p);
|
|
||||||
pic_defun(pic, "make-identifier", pic_macro_make_identifier);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue