forge: define words with Lisp code
This commit is contained in:
parent
ca1f56e11a
commit
84e9a2bfc5
1 changed files with 5 additions and 2 deletions
|
|
@ -181,7 +181,8 @@
|
|||
#:ptr #:get #:put
|
||||
#:in #:next
|
||||
#:call #:call-if #:call-while #:comp #:lit #:val
|
||||
#:<comp #:reg #:regc #:reg-lisp #:/>
|
||||
#:<comp #:reg #:regc #:/>
|
||||
#:lisp #:reg-lisp
|
||||
#:setup-builtins
|
||||
))
|
||||
|
||||
|
|
@ -230,10 +231,12 @@
|
|||
|
||||
(f:reg 'reg #'f:reg-code)
|
||||
(f:reg 'regc #'(lambda () (f:reg-code 'f:comp-word)))
|
||||
(f:reg 'reg-lisp (lambda () (f:reg (f:popd) (f:compile-lisp (f:popd)))))
|
||||
|
||||
(f:reg '/> #'(lambda () (iter:stop f:*input*)) 'f:comp-word)
|
||||
|
||||
(f:reg 'lisp (lambda () (cons (f:compile-lisp (f:popd)) f::*buffer*)))
|
||||
(f:reg 'reg-lisp (lambda () (f:reg (f:popd) (f:compile-lisp (f:popd)))))
|
||||
|
||||
;;;; forge-code word definitions
|
||||
|
||||
(defun setup-builtins ()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue