From 758ed85b01de0a655ac4f91c3682111de220031d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 7 Jul 2018 06:58:36 -0400 Subject: - Improved syntax for pattern-matching. --- luxc/src/lux/analyser.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'luxc/src') diff --git a/luxc/src/lux/analyser.clj b/luxc/src/lux/analyser.clj index 56cb8a375..0cc908e0e 100644 --- a/luxc/src/lux/analyser.clj +++ b/luxc/src/lux/analyser.clj @@ -141,11 +141,6 @@ (&/with-cursor cursor (&&lux/analyse-program analyse optimize compile-program ?program))) - "lux case" - (|let [(&/$Cons ?value (&/$Cons [_ (&/$Record ?branches)] (&/$Nil))) parameters] - (&/with-analysis-meta cursor exo-type - (&&lux/analyse-case analyse exo-type ?value ?branches))) - "lux function" (|let [(&/$Cons [_ (&/$Symbol "" ?self)] (&/$Cons [_ (&/$Symbol "" ?arg)] @@ -182,6 +177,11 @@ (&/with-analysis-meta cursor exo-type (analyse-variant+ analyse exo-type ?ident parameters)) + (&/$Record ?pattern-matching) + (|let [(&/$Cons ?input (&/$Nil)) parameters] + (&/with-analysis-meta cursor exo-type + (&&lux/analyse-case analyse exo-type ?input ?pattern-matching))) + _ (&/with-cursor cursor (|do [=fn (just-analyse analyse (&/T [command-meta command]))] -- cgit v1.2.3