diff options
author | Eduardo Julian | 2017-01-11 21:39:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-01-11 21:39:30 -0400 |
commit | 8b158ecbd330dce3603ba5e854fb21ca482c0b64 (patch) | |
tree | 3980fe603fa72740713e0a496f33a5123ae4a876 /luxc/src/lux/repl.clj | |
parent | e44d30c41694a574ae00b55c333e39e4e83c478a (diff) |
- Fixed some bugs in the REPL.
Diffstat (limited to '')
-rw-r--r-- | luxc/src/lux/repl.clj | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/luxc/src/lux/repl.clj b/luxc/src/lux/repl.clj index 195f3dc3e..1c727f246 100644 --- a/luxc/src/lux/repl.clj +++ b/luxc/src/lux/repl.clj @@ -24,14 +24,14 @@ (defn ^:private repl-cursor [repl-line] (&/T [repl-module repl-line 0])) -(defn ^:private init [source-dirs] - (do (&compiler/init!) +(defn ^:private init [resources-dirs source-dirs target-dir] + (do (&compiler/init! resources-dirs target-dir) (|case ((|do [_ (&compiler/compile-module source-dirs "lux") _ (&cache/delete repl-module) _ (&module/create-module repl-module 0) _ (fn [?state] (return* (&/set$ &/$source - (&/|list (&/T [(repl-cursor -1) "(;import lux)"])) + (&/|list (&/T [(repl-cursor -1) "(;module: lux)"])) ?state) nil)) analysed-tokens (&analyser/repl-analyse &optimizer/optimize &compiler/eval! (partial &compiler/compile-module source-dirs) &compiler/all-compilers) @@ -50,9 +50,9 @@ )) ;; [Values] -(defn repl [source-dirs] +(defn repl [resources-dirs source-dirs target-dir] (with-open [input (->> System/in (new InputStreamReader) (new BufferedReader))] - (loop [state (init source-dirs) + (loop [state (init resources-dirs source-dirs target-dir) repl-line 0 multi-line? false] (let [_ (if (not multi-line?) |