aboutsummaryrefslogtreecommitdiff
path: root/lux-bootstrapper
diff options
context:
space:
mode:
authorEduardo Julian2022-06-26 19:37:45 -0400
committerEduardo Julian2022-06-26 19:37:45 -0400
commit853d28f803e75d125915a81dcdcd140513efe3d2 (patch)
tree41d24b6cb5593b631793efa77f53359e8229ea37 /lux-bootstrapper
parent9f6505491e8a5c8a159ce094fe0af6f4fef0c5cf (diff)
Re-named directives to declarations.
Diffstat (limited to 'lux-bootstrapper')
-rw-r--r--lux-bootstrapper/src/lux/analyser/lux.clj6
-rw-r--r--lux-bootstrapper/src/lux/base.clj8
2 files changed, 7 insertions, 7 deletions
diff --git a/lux-bootstrapper/src/lux/analyser/lux.clj b/lux-bootstrapper/src/lux/analyser/lux.clj
index 6f7b747c1..23f6cf4fa 100644
--- a/lux-bootstrapper/src/lux/analyser/lux.clj
+++ b/lux-bootstrapper/src/lux/analyser/lux.clj
@@ -578,7 +578,7 @@
(eval! (optimize analysis))))
(defn analyse-def* [analyse optimize eval! compile-def ?name ?value exported? type? & [?expected-type]]
- (|do [_ &/ensure-directive
+ (|do [_ &/ensure-declaration
module-name &/get-module-name
_ (ensure-undefined! module-name ?name)
=value (&/without-repl-closure
@@ -684,7 +684,7 @@
(deliver (&/$Right _compiler))))))))
(defn analyse-module [analyse optimize eval! compile-module ?imports]
- (|do [_ &/ensure-directive
+ (|do [_ &/ensure-declaration
module-name &/get-module-name
_imports (&&module/fetch-imports ?imports)
current-module &/get-module-name
@@ -741,7 +741,7 @@
(let [program-type (&/$Function (&/$Apply &type/Text &type/List)
(&/$Apply &type/Any &type/IO))]
(defn analyse-program [analyse optimize compile-program ?program]
- (|do [_ &/ensure-directive
+ (|do [_ &/ensure-declaration
=program (&&/analyse-1 analyse program-type ?program)
_ (compile-program (optimize =program))]
(return &/$End))))
diff --git a/lux-bootstrapper/src/lux/base.clj b/lux-bootstrapper/src/lux/base.clj
index 88f06d928..d0c457680 100644
--- a/lux-bootstrapper/src/lux/base.clj
+++ b/lux-bootstrapper/src/lux/base.clj
@@ -478,7 +478,7 @@
($Item head tail))
($Item (T [slot value]) $End)
prefix)
-
+
($Item [k v] input*)
(if (= k slot)
(fold (fn [tail head]
@@ -487,7 +487,7 @@
prefix)
(recur ($Item (T [k v]) prefix)
input*))
- )))
+ )))
(defmacro |table [& elems]
(reduce (fn [table [k v]]
@@ -1115,14 +1115,14 @@
output))))))
(def ^{:doc "(Meta Any)"}
- ensure-directive
+ ensure-declaration
(fn [state]
(|case (get$ $expected state)
($None)
(return* state unit-tag)
($Some _)
- ((fail-with-loc "[Error] All directives must be top-level forms.")
+ ((fail-with-loc "[Error] All declarations must be top-level forms.")
state))))
(def location