aboutsummaryrefslogtreecommitdiff
path: root/lux-bootstrapper
diff options
context:
space:
mode:
authorEduardo Julian2022-10-03 20:14:08 -0400
committerEduardo Julian2022-10-03 20:14:08 -0400
commitd9a1d70ec04fd5796276aeb46038654ade4484f9 (patch)
tree9d658e79313853703f74077dc0087aae598ea542 /lux-bootstrapper
parent2800492f26ee51c75fc056493e0946b39d5f503b (diff)
Migrating default extensions to the new format [Part 1]
Diffstat (limited to '')
-rw-r--r--lux-bootstrapper/src/lux/analyser.clj44
1 files changed, 22 insertions, 22 deletions
diff --git a/lux-bootstrapper/src/lux/analyser.clj b/lux-bootstrapper/src/lux/analyser.clj
index 0a168b38b..cde1b762c 100644
--- a/lux-bootstrapper/src/lux/analyser.clj
+++ b/lux-bootstrapper/src/lux/analyser.clj
@@ -89,6 +89,28 @@
(&/$Form (&/$Item [command-meta command] parameters))
(|case command
+ (&/$Identifier "library/lux" "def#")
+ (|let [(&/$Item [_ (&/$Identifier "" ?name)]
+ (&/$Item ?value
+ (&/$Item exported?
+ (&/$End))
+ )) parameters]
+ (&/with-location location
+ (&&lux/analyse-def analyse optimize eval! compile-def ?name ?value exported?)))
+
+ (&/$Identifier "library/lux" "alias#")
+ (|let [(&/$Item [_ (&/$Identifier "" ?alias)]
+ (&/$Item [_ (&/$Identifier ?original)]
+ (&/$End)
+ )) parameters]
+ (&/with-location location
+ (&&lux/analyse-def-alias ?alias ?original)))
+
+ (&/$Identifier "library/lux" "module#")
+ (|let [(&/$Item ?imports (&/$End)) parameters]
+ (&/with-location location
+ (&&lux/analyse-module analyse optimize eval! compile-module ?imports)))
+
(&/$Text ?procedure)
(case ?procedure
"lux type check"
@@ -109,28 +131,6 @@
(&/with-analysis-meta location exo-type
(&&lux/analyse-type-as analyse optimize eval! exo-type ?type ?value)))
- "lux def"
- (|let [(&/$Item [_ (&/$Identifier "" ?name)]
- (&/$Item ?value
- (&/$Item exported?
- (&/$End))
- )) parameters]
- (&/with-location location
- (&&lux/analyse-def analyse optimize eval! compile-def ?name ?value exported?)))
-
- "lux def alias"
- (|let [(&/$Item [_ (&/$Identifier "" ?alias)]
- (&/$Item [_ (&/$Identifier ?original)]
- (&/$End)
- )) parameters]
- (&/with-location location
- (&&lux/analyse-def-alias ?alias ?original)))
-
- "lux def module"
- (|let [(&/$Item ?imports (&/$End)) parameters]
- (&/with-location location
- (&&lux/analyse-module analyse optimize eval! compile-module ?imports)))
-
"lux in-module"
(|let [(&/$Item [_ (&/$Text ?module)] (&/$Item ?expr (&/$End))) parameters]
(&/with-location location