From 772ff99830d133b2e36ad1b09c66223ef1085c71 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 14 Nov 2017 23:57:15 -0400 Subject: - Modified the syntax for module definitions. - Fixed some bugs. --- luxc/src/lux/analyser.clj | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'luxc/src') 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)) -- cgit v1.2.3