diff options
author | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-05-15 16:21:29 +0200 |
---|---|---|
committer | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-05-15 16:21:29 +0200 |
commit | d917f41beca176b8f2b682ac3a2c25b148752b71 (patch) | |
tree | 7dca0da8e57841f2f8efa31783196888511002cd /src/types.lisp | |
parent | f5cb35b87255ebbe2d322bcedde6bc7d5f6aebae (diff) |
Add syntax form for writing macros
* src/core.lisp (syntax): Change evaluation rules to replace arguments inside
macro expansion.
* src/eval.lisp (tree-eval): Add Evaluation route for chains with a syntax
closure.
* t/test4.chn: New file.
Diffstat (limited to 'src/types.lisp')
-rw-r--r-- | src/types.lisp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/types.lisp b/src/types.lisp index 09ede2b..06183b1 100644 --- a/src/types.lisp +++ b/src/types.lisp @@ -36,15 +36,20 @@ :initarg :specialp :type boolean :documentation "") + (type :reader closure-type + :initarg :type + :type keyword + :documentation "") (groupp :reader closure-group-p :initarg :groupp :type function :documentation ""))) -(defun make-closure (function arg-list specialp groupp &optional environment) +(defun make-closure (function arg-list specialp groupp &optional environment type) (make-instance 'closure :function function :arg-list arg-list :specialp specialp :groupp groupp - :environment environment)) + :environment environment + :type type)) (defun closurep (object) (typep object 'closure)) |