Notes to selves

This commit is contained in:
Scott Richmond 2022-03-19 17:30:41 -04:00
parent 3f0feab83b
commit a4c5927ec4

View File

@ -47,6 +47,7 @@
(merge ctx new-ctx)) (merge ctx new-ctx))
;; TODO: get "if let" pattern working ;; TODO: get "if let" pattern working
;; TODO: get typed exceptions to distinguish panics
(defn- interpret-let [ast ctx] (defn- interpret-let [ast ctx]
(let [pattern (:pattern ast) (let [pattern (:pattern ast)
expr (:expr ast) expr (:expr ast)
@ -101,6 +102,8 @@
;; note that the runtime representations of collections is ;; note that the runtime representations of collections is
;; unboxed in the tree-walk interpreter ;; unboxed in the tree-walk interpreter
;; tuples & lists are both vectors, the first element
;; distinguishes them
::ast/tuple ::ast/tuple
(let [members (:members ast)] (let [members (:members ast)]
(into [::colls/tuple] (map #(interpret % ctx)) members)) (into [::colls/tuple] (map #(interpret % ctx)) members))