aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/analyser.clj16
1 files changed, 8 insertions, 8 deletions
diff --git a/luxc/src/lux/analyser.clj b/luxc/src/lux/analyser.clj
index 0cc908e0e..9052e6f8f 100644
--- a/luxc/src/lux/analyser.clj
+++ b/luxc/src/lux/analyser.clj
@@ -141,14 +141,6 @@
(&/with-cursor cursor
(&&lux/analyse-program analyse optimize compile-program ?program)))
- "lux function"
- (|let [(&/$Cons [_ (&/$Symbol "" ?self)]
- (&/$Cons [_ (&/$Symbol "" ?arg)]
- (&/$Cons ?body
- (&/$Nil)))) parameters]
- (&/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
@@ -177,11 +169,19 @@
(&/with-analysis-meta cursor exo-type
(analyse-variant+ analyse exo-type ?ident parameters))
+ ;; Pattern-matching syntax.
(&/$Record ?pattern-matching)
(|let [(&/$Cons ?input (&/$Nil)) parameters]
(&/with-analysis-meta cursor exo-type
(&&lux/analyse-case analyse exo-type ?input ?pattern-matching)))
+ ;; Function syntax.
+ (&/$Tuple (&/$Cons [_ (&/$Symbol "" ?self)]
+ (&/$Cons [_ (&/$Symbol "" ?arg)] (&/$Nil))))
+ (|let [(&/$Cons ?body (&/$Nil)) parameters]
+ (&/with-analysis-meta cursor exo-type
+ (&&lux/analyse-function analyse exo-type ?self ?arg ?body)))
+
_
(&/with-cursor cursor
(|do [=fn (just-analyse analyse (&/T [command-meta command]))]