mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Adding file temporarily for testing
This commit is contained in:
parent
a27a62d65b
commit
0882b90204
1 changed files with 22 additions and 0 deletions
22
test-eval-compilation.scm
Normal file
22
test-eval-compilation.scm
Normal file
|
@ -0,0 +1,22 @@
|
|||
;; A temporary test file
|
||||
(import (scheme base) (scheme write))
|
||||
|
||||
(define (analyze . opts)
|
||||
(write 'test))
|
||||
|
||||
(define (analyze-if exp a-env rename-env local-renamed)
|
||||
(let ((pproc (analyze (if-predicate exp) a-env rename-env local-renamed))
|
||||
(cproc (analyze (if-consequent exp) a-env rename-env local-renamed))
|
||||
(aproc (analyze (if-alternative exp) a-env rename-env local-renamed)))
|
||||
(lambda (env)
|
||||
(if (pproc env)
|
||||
(cproc env)
|
||||
(aproc env)))))
|
||||
(define (if-predicate exp) (cadr exp))
|
||||
(define (if-consequent exp) (caddr exp))
|
||||
(define (if-alternative exp)
|
||||
(if (not (null? (cdddr exp))) ;; TODO: add (not) support
|
||||
(cadddr exp)
|
||||
#f))
|
||||
|
||||
(write (analyze-if 'a 'b 'c 'd))
|
Loading…
Add table
Reference in a new issue