Remove conflicting repl cruft.

This commit is contained in:
Scott Richmond 2023-12-24 15:59:31 -05:00
commit 20ea25761a
3 changed files with 4 additions and 8 deletions

View File

@ -229,7 +229,7 @@
(defp loop-expr group order-1 [(quiet :loop) tuple (quiet :with) (defp loop-expr group order-1 [(quiet :loop) tuple (quiet :with)
(flat (choice :loop-body [fn-clause compound-loop]))]) (flat (choice :loop-body [fn-clause compound-loop]))])
(defp repeat-expr group order-1 [(quiet :repeat) (choice :times [:word :number]) block]) (defp repeat-expr group order-1 [(quiet :repeat) (choice :times [:word :number]) non-binding])
(defp collection flat choice [;struct-literal (defp collection flat choice [;struct-literal
dict list-literal set-literal tuple]) dict list-literal set-literal tuple])

View File

@ -811,9 +811,9 @@
times (if (= :word (:type times-expr)) times (if (= :word (:type times-expr))
(resolve-word times-expr ctx) (resolve-word times-expr ctx)
(-> times-expr :data first)) (-> times-expr :data first))
block (second data)] expr (second data)]
(if (not (number? times)) (throw (ex-info (str "Repeat needs a number, not a " (base/get-type times)) {}))) (if (not (number? times)) (throw (ex-info (str "Repeat needs a number, not a " (base/get-type times)) {})))
(dotimes [_ times] (interpret-ast block ctx)))) (dotimes [_ times] (interpret-ast expr ctx))))
(defn- interpret-literal [ast] (-> ast :data first)) (defn- interpret-literal [ast] (-> ast :data first))

View File

@ -67,11 +67,7 @@
(do (do
(def source " (def source "
test \"foo\" false
test \"bar\" true
test \"baz\" {
let quux = florp
}
") ")
(-> source run :test println) (-> source run :test println)