Additional safety check for empty env

This commit is contained in:
Justin Ethier 2018-01-19 11:56:10 -05:00
parent 338c195e81
commit 183b3c5eb2

View file

@ -747,7 +747,8 @@
(define (macro:macro? exp defined-macros) (assoc (car exp) defined-macros))
(define (macro:get-local-renames macro current-rename-lis)
(if (eq? 3 (length macro))
(if (and (eq? 3 (length macro))
(not (null? (caddr macro))))
(caddr macro)
current-rename-lis))
@ -759,7 +760,7 @@
(result #f))
;(newline)
;(display "/* ")
;(display (list 'macro:expand exp macro compiled-macro?))
;(display (list 'macro:expand exp macro compiled-macro? local-renamed))
;(display "*/ ")
;; Invoke ER macro