aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2019-09-07 20:02:14 -0400
committerEduardo Julian2019-09-07 20:02:14 -0400
commit5f494b497e79bcea1d3c64d663ca5435bbf8ca2d (patch)
tree2a7ac78ae896042039e1311a14948026cbe66585 /luxc
parent747abe180b2669b6af5779dcf39ab5a8b6ed11ed (diff)
Renamed "Statement" to "Directive".
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/analyser/lux.clj6
-rw-r--r--luxc/src/lux/base.clj4
2 files changed, 5 insertions, 5 deletions
diff --git a/luxc/src/lux/analyser/lux.clj b/luxc/src/lux/analyser/lux.clj
index 0a6858a92..8a2f4b70c 100644
--- a/luxc/src/lux/analyser/lux.clj
+++ b/luxc/src/lux/analyser/lux.clj
@@ -542,7 +542,7 @@
(return (&/|list output))))
(defn analyse-def* [analyse optimize eval! compile-def ?name ?value ?meta exported? & [?expected-type]]
- (|do [_ &/ensure-statement
+ (|do [_ &/ensure-directive
module-name &/get-module-name
? (&&module/defined? module-name ?name)
_ (&/assert! (not ?)
@@ -650,7 +650,7 @@
(deliver (&/$Right _compiler))))))))
(defn analyse-module [analyse optimize eval! compile-module ?meta ?imports]
- (|do [_ &/ensure-statement
+ (|do [_ &/ensure-directive
=anns (&&/analyse-1 analyse &type/Code ?meta)
==anns (eval! (optimize =anns))
module-name &/get-module-name
@@ -713,7 +713,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-statement
+ (|do [_ &/ensure-directive
=program (&&/analyse-1 analyse program-type ?program)
_ (compile-program (optimize =program))]
(return &/$Nil))))
diff --git a/luxc/src/lux/base.clj b/luxc/src/lux/base.clj
index 0d7d661d7..f91bc4f2a 100644
--- a/luxc/src/lux/base.clj
+++ b/luxc/src/lux/base.clj
@@ -1071,14 +1071,14 @@
output))))))
(def ^{:doc "(Meta Any)"}
- ensure-statement
+ ensure-directive
(fn [state]
(|case (get$ $expected state)
($None)
(return* state unit-tag)
($Some _)
- ((fail-with-loc "[Error] All statements must be top-level forms.")
+ ((fail-with-loc "[Error] All directives must be top-level forms.")
state))))
(def cursor