mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +02:00
Added note about qq support
This commit is contained in:
parent
1d5892fd8d
commit
309c029097
1 changed files with 7 additions and 0 deletions
7
eval.scm
7
eval.scm
|
@ -35,6 +35,9 @@
|
||||||
(define (quoted? exp)
|
(define (quoted? exp)
|
||||||
(tagged-list? exp 'quote))
|
(tagged-list? exp 'quote))
|
||||||
|
|
||||||
|
(define (quasiquoted? exp)
|
||||||
|
(tagged-list? exp 'quasiquote))
|
||||||
|
|
||||||
(define (assignment? exp)
|
(define (assignment? exp)
|
||||||
(tagged-list? exp 'set!))
|
(tagged-list? exp 'set!))
|
||||||
(define (assignment-variable exp) (cadr exp))
|
(define (assignment-variable exp) (cadr exp))
|
||||||
|
@ -352,6 +355,7 @@
|
||||||
(cond ((self-evaluating? exp)
|
(cond ((self-evaluating? exp)
|
||||||
(analyze-self-evaluating exp))
|
(analyze-self-evaluating exp))
|
||||||
((quoted? exp) (analyze-quoted exp))
|
((quoted? exp) (analyze-quoted exp))
|
||||||
|
((quasiquoted? exp) (analyze-quasiquoted exp))
|
||||||
((variable? exp) (analyze-variable exp))
|
((variable? exp) (analyze-variable exp))
|
||||||
((assignment? exp) (analyze-assignment exp))
|
((assignment? exp) (analyze-assignment exp))
|
||||||
((definition? exp) (analyze-definition exp))
|
((definition? exp) (analyze-definition exp))
|
||||||
|
@ -389,6 +393,9 @@
|
||||||
(let ((qval (cadr exp)))
|
(let ((qval (cadr exp)))
|
||||||
(lambda (env) qval)))
|
(lambda (env) qval)))
|
||||||
|
|
||||||
|
(define (analyze-quasiquoted exp)
|
||||||
|
(error "quasiquote not supported yet by eval"))
|
||||||
|
|
||||||
(define (analyze-variable exp)
|
(define (analyze-variable exp)
|
||||||
(lambda (env) (lookup-variable-value exp env)))
|
(lambda (env) (lookup-variable-value exp env)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue