Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added delta-eval-block (untested)

  • Loading branch information...
commit cc00937aca024e46d8107c4cad45800fb4d9ab36 1 parent 2238304
@zephyrfalcon authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 interpreter.scm
View
15 interpreter.scm
@@ -137,3 +137,18 @@
(evaled-args (map (^a (delta-eval a ns interp)) ast-args)))
(f target evaled-args ns interp))
(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 :-)
+
Please sign in to comment.
Something went wrong with that request. Please try again.