diff options
author | Eduardo Julian | 2018-07-07 06:58:36 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-07 06:58:36 -0400 |
commit | 758ed85b01de0a655ac4f91c3682111de220031d (patch) | |
tree | cd11d22c5215051d108ff9a181e375ae8e20cc3a /luxc/src | |
parent | 1b5cb7ab5ff0b774f0cd12f9504b82dae9ae977d (diff) |
- Improved syntax for pattern-matching.
Diffstat (limited to '')
-rw-r--r-- | luxc/src/lux/analyser.clj | 10 |
1 files changed, 5 insertions, 5 deletions
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]))] |