mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 06:47:37 +02:00
WIP
This commit is contained in:
parent
12d16dfbbe
commit
d549722cc4
2 changed files with 7 additions and 6 deletions
|
@ -882,7 +882,11 @@
|
||||||
(cond
|
(cond
|
||||||
((const? exp) exp)
|
((const? exp) exp)
|
||||||
((prim? exp) exp)
|
((prim? exp) exp)
|
||||||
((ref? exp) exp)
|
((ref? exp)
|
||||||
|
(let ((renamed (assoc exp local-renamed)))
|
||||||
|
(if renamed
|
||||||
|
(cdr renamed) ;; Extract renamed symbol
|
||||||
|
exp)))
|
||||||
((quote? exp) exp)
|
((quote? exp) exp)
|
||||||
;; TODO: rename all lambda formals and update rename-env accordingly.
|
;; TODO: rename all lambda formals and update rename-env accordingly.
|
||||||
;; will also require renaming refs later on here in expand...
|
;; will also require renaming refs later on here in expand...
|
||||||
|
@ -898,10 +902,7 @@
|
||||||
(map cdr a-lookup)
|
(map cdr a-lookup)
|
||||||
ltype))
|
ltype))
|
||||||
)
|
)
|
||||||
`(lambda ,(lambda->formals exp)
|
`(lambda ,new-formals ;,(lambda->formals exp)
|
||||||
;; TODO: want this line instead of the above, but need to solve a crash
|
|
||||||
;; when compiling unit tests first (!!!)
|
|
||||||
;`(lambda ,new-formals ;,(lambda->formals exp)
|
|
||||||
,@(_expand-body
|
,@(_expand-body
|
||||||
'()
|
'()
|
||||||
(lambda->exp exp)
|
(lambda->exp exp)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
(let ((x 'outer))
|
(let ((x 'outer))
|
||||||
;(let-syntax ((m (syntax-rules () ((m) x))))
|
;(let-syntax ((m (syntax-rules () ((m) x))))
|
||||||
(let ((x 'inner))
|
(let ((x 'inner))
|
||||||
(list)))) ;; Should be outer
|
(x)))) ;; Should be outer
|
||||||
; )
|
; )
|
||||||
;;;; Just testing, may want to remove this one once the recursive macro expansion works
|
;;;; Just testing, may want to remove this one once the recursive macro expansion works
|
||||||
;;; (define-syntax my-or2 (syntax-rules ()
|
;;; (define-syntax my-or2 (syntax-rules ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue