/
cl.lisp
34 lines (28 loc) · 1.18 KB
/
cl.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(cl:in-package "https://github.com/g000001/srfi-46#internals")
(in-readtable :quasiquote)
(cl:defparameter *cl-define-syntax-mstore* (null-mstore))
(cl:defmacro define-syntax (cl:&whole whole name cl:&body body)
(cl:declare (cl:ignore body))
#+lispworks (cl:declare (hcl:lambda-list name cl:&body body))
`(cl:eval-when (:compile-toplevel :load-toplevel :execute)
(expand-top-level-forms!
(list ',whole)
*cl-define-syntax-mstore*)
(cl:defmacro ,name (cl:&whole whole cl:&rest args)
(cl:declare (cl:ignore args))
(car (expand-top-level-forms!
(list whole)
*cl-define-syntax-mstore*)))))
(cl:defmacro let-syntax (cl:&whole whole binds cl:&body body)
(cl:declare (cl:ignore binds body))
(car (expand-top-level-forms! (list whole)
*cl-define-syntax-mstore*)))
(cl:defmacro letrec-syntax (cl:&whole whole binds cl:&body body)
(cl:declare (cl:ignore binds body))
(car (expand-top-level-forms! (list whole)
*cl-define-syntax-mstore*)))
#|(cl:defmacro with-scheme-macro (cl:&body body)
(expand-top-level-forms!
`(cl:progn ,@body)
*cl-define-syntax-mstore*))|#
;;; eof