diff options
author | Eduardo Julian | 2017-05-30 21:35:37 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-05-30 21:35:37 -0400 |
commit | b73f1c909d19d5492d6d9a7dc707a3b817c73619 (patch) | |
tree | 369d957687852bb5ca0024e9175072f5c92bf6d1 /new-luxc/source/luxc/analyser.lux | |
parent | 56b0ca377a30e30bf832d6dfdb789676f67e7ade (diff) |
- Documented the analysis phase.
- Some refactoring.
- Removed singleton variants.
Diffstat (limited to 'new-luxc/source/luxc/analyser.lux')
-rw-r--r-- | new-luxc/source/luxc/analyser.lux | 3 |
1 files changed, 3 insertions, 0 deletions
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 [<tag> <analyser>] @@ -57,6 +59,7 @@ (^ (#;Tuple (list))) &&primitive;analyse-unit + ## Singleton tuples are equivalent to the element they contain. (^ (#;Tuple (list singleton))) (analyse singleton) |