From b73f1c909d19d5492d6d9a7dc707a3b817c73619 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 30 May 2017 21:35:37 -0400 Subject: - Documented the analysis phase. - Some refactoring. - Removed singleton variants. --- new-luxc/source/luxc/analyser.lux | 3 +++ 1 file changed, 3 insertions(+) (limited to 'new-luxc/source/luxc/analyser.lux') diff --git a/new-luxc/source/luxc/analyser.lux b/new-luxc/source/luxc/analyser.lux index 44fa96081..e79b74f01 100644 --- a/new-luxc/source/luxc/analyser.lux +++ b/new-luxc/source/luxc/analyser.lux @@ -41,6 +41,8 @@ (: (-> Code (Lux la;Analysis)) (function analyse [ast] (let [[cursor ast'] ast] + ## The cursor must be set in the compiler for the sake + ## of having useful error messages. (&;with-cursor cursor (case ast' (^template [ ] @@ -57,6 +59,7 @@ (^ (#;Tuple (list))) &&primitive;analyse-unit + ## Singleton tuples are equivalent to the element they contain. (^ (#;Tuple (list singleton))) (analyse singleton) -- cgit v1.2.3