make default-environment a zero-ary procedure
This commit is contained in:
parent
dfe8e87e65
commit
b89de785ee
3291
lib/ext/eval.c
3291
lib/ext/eval.c
File diff suppressed because it is too large
Load Diff
|
@ -112,7 +112,8 @@
|
||||||
core#if
|
core#if
|
||||||
core#begin
|
core#begin
|
||||||
core#define-macro))
|
core#define-macro))
|
||||||
env))
|
(lambda ()
|
||||||
|
env)))
|
||||||
|
|
||||||
(define (extend-environment parent)
|
(define (extend-environment parent)
|
||||||
(%make-environment parent #f (make-ephemeron-table)))
|
(%make-environment parent #f (make-ephemeron-table)))
|
||||||
|
@ -224,7 +225,7 @@
|
||||||
(error "invalid expression" expr))))
|
(error "invalid expression" expr))))
|
||||||
|
|
||||||
(define (expand expr . env)
|
(define (expand expr . env)
|
||||||
(let ((x (expand-node expr (if (null? env) default-environment (car env)))))
|
(let ((x (expand-node expr (if (null? env) (default-environment) (car env)))))
|
||||||
(run-all)
|
(run-all)
|
||||||
x))
|
x))
|
||||||
|
|
||||||
|
@ -253,7 +254,7 @@
|
||||||
(dictionary-set! (macro-objects) name transformer))
|
(dictionary-set! (macro-objects) name transformer))
|
||||||
|
|
||||||
(define (the var)
|
(define (the var)
|
||||||
(make-identifier var default-environment))
|
(make-identifier var (default-environment)))
|
||||||
|
|
||||||
(let
|
(let
|
||||||
;; cache popular identifiers
|
;; cache popular identifiers
|
||||||
|
|
Loading…
Reference in New Issue