aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2017-11-14 23:57:15 -0400
committerEduardo Julian2017-11-14 23:57:15 -0400
commit772ff99830d133b2e36ad1b09c66223ef1085c71 (patch)
tree66588cb41e82c1334e4a75f44ad6014a14fbc776 /luxc
parenta3b9b19231047ec6da8decfc7d45db0598622651 (diff)
- Modified the syntax for module definitions.
- Fixed some bugs.
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/analyser.clj17
1 files changed, 5 insertions, 12 deletions
diff --git a/luxc/src/lux/analyser.clj b/luxc/src/lux/analyser.clj
index 6fc5986ac..13bf3bc61 100644
--- a/luxc/src/lux/analyser.clj
+++ b/luxc/src/lux/analyser.clj
@@ -157,6 +157,11 @@
(&/with-analysis-meta cursor exo-type
(&&lux/analyse-function analyse exo-type ?self ?arg ?body)))
+ "lux module"
+ (|let [(&/$Cons ?meta (&/$Nil)) parameters]
+ (&/with-cursor cursor
+ (&&lux/analyse-module analyse optimize eval! compile-module ?meta)))
+
;; else
(&/with-analysis-meta cursor exo-type
(cond (.startsWith ^String ?procedure "jvm")
@@ -170,18 +175,6 @@
:else
(&&common/analyse-proc analyse exo-type ?procedure parameters))))
- (&/$Symbol _ command-name)
- (case command-name
- "_lux_module"
- (|let [(&/$Cons ?meta (&/$Nil)) parameters]
- (&/with-cursor cursor
- (&&lux/analyse-module analyse optimize eval! compile-module ?meta)))
-
- ;; else
- (&/with-cursor cursor
- (|do [=fn (just-analyse analyse (&/T [command-meta command]))]
- (&&lux/analyse-apply analyse cursor exo-type macro-caller =fn parameters))))
-
(&/$Nat idx)
(&/with-analysis-meta cursor exo-type
(&&lux/analyse-variant analyse (&/$Right exo-type) idx nil parameters))