Skip to content

Commit

Permalink
added delta-eval-block (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrfalcon committed Mar 15, 2011
1 parent 2238304 commit cc00937
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions interpreter.scm
Expand Up @@ -137,3 +137,18 @@
(evaled-args (map (^a (delta-eval a ns interp)) ast-args))) (evaled-args (map (^a (delta-eval a ns interp)) ast-args)))
(f target evaled-args ns interp)) (f target evaled-args ns interp))
(error "Unknown method:" method-name)))) (error "Unknown method:" method-name))))

;; Evaluate the expressions in the given delta-block record, in the
;; given namespace. (Usually said namespace should derive from the
;; block's associated namespace.)
;; Will be used by built-in method calls.
(define (delta-eval-block block ns interp)
(let ((result #f))
(for-each
(lambda (expr)
(set! result (delta-eval expr ns interp)))
(delta-block-exprs block))
result))
;; FIXME: if result is #f, look up and return the Null object
;; (at point of writing, it doesn't exist yet :-)

0 comments on commit cc00937

Please sign in to comment.