aboutsummaryrefslogtreecommitdiff
path: root/src/lux/analyser/lux.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/lux/analyser/lux.clj')
-rw-r--r--src/lux/analyser/lux.clj11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lux/analyser/lux.clj b/src/lux/analyser/lux.clj
index edf707adc..d30096ab1 100644
--- a/src/lux/analyser/lux.clj
+++ b/src/lux/analyser/lux.clj
@@ -127,15 +127,16 @@
))
(defn analyse-case [analyse ?value ?branches]
- (prn 'analyse-case (aget ?branches 0) (aget ?branches 1 1 0)
- (&/->seq ?branches))
+ ;; (prn 'analyse-case (aget ?branches 0) (aget ?branches 1 1 0)
+ ;; (&/->seq ?branches))
(exec [:let [num-branches (&/|length ?branches)
- _ (prn 'analyse-case ?value (&/|length ?branches)
- (and (> num-branches 0) (even? num-branches)))]
+ ;; _ (prn 'analyse-case ?value (&/|length ?branches)
+ ;; (and (> num-branches 0) (even? num-branches)))
+ ]
_ (&/assert! (and (> num-branches 0) (even? num-branches))
"[Analyser Error] Unbalanced branches in \"case'\" expression.")
:let [branches (&/|as-pairs ?branches)
- _ (prn '(&/|length branches) (&/|length branches))
+ ;; _ (prn '(&/|length branches) (&/|length branches))
locals-per-branch (&/|map (comp &&case/locals &/|first) branches)
max-locals (&/fold max 0 (&/|map &/|length locals-per-branch))]
;; :let [_ (prn '[branches locals-per-branch max-locals] [branches locals-per-branch max-locals])]