diff options
author | Eduardo Julian | 2017-10-29 22:21:14 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-29 22:21:14 -0400 |
commit | 7b870a7bd124f35939d9089a2e21f0806a4c6e85 (patch) | |
tree | 076fb3544dbb1a811cfbb9dd54008b0753dead16 /new-luxc/source/luxc/generator/primitive.jvm.lux | |
parent | 2dc99a7b62fc5fc19d9982ad4398606f3aebb7a5 (diff) |
- Fixed some bugs.
- Improved error reporting.
- Implemented macro-expansion (for JVM).
- Implemented "let" compilation.
Diffstat (limited to 'new-luxc/source/luxc/generator/primitive.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/generator/primitive.jvm.lux | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/generator/primitive.jvm.lux b/new-luxc/source/luxc/generator/primitive.jvm.lux index fc6ffae1f..571ba4835 100644 --- a/new-luxc/source/luxc/generator/primitive.jvm.lux +++ b/new-luxc/source/luxc/generator/primitive.jvm.lux @@ -2,8 +2,9 @@ lux (lux (control monad) (data text/format) - [meta #+ Monad<Meta> "Meta/" Monad<Meta>]) + [meta "meta/" Monad<Meta>]) (luxc ["&" base] + [";L" host] (lang ["la" analysis] ["ls" synthesis]) ["&;" analyser] @@ -16,18 +17,18 @@ (def: #export generate-unit (Meta $;Inst) - (Meta/wrap ($i;string ../runtime;unit))) + (meta/wrap ($i;string hostL;unit))) (def: #export (generate-bool value) (-> Bool (Meta $;Inst)) - (Meta/wrap ($i;GETSTATIC "java.lang.Boolean" + (meta/wrap ($i;GETSTATIC "java.lang.Boolean" (if value "TRUE" "FALSE") ($t;class "java.lang.Boolean" (list))))) (do-template [<name> <type> <load> <wrap>] [(def: #export (<name> value) (-> <type> (Meta $;Inst)) - (Meta/wrap (|>. (<load> value) <wrap>)))] + (meta/wrap (|>. (<load> value) <wrap>)))] [generate-nat Nat (|>. (:! Int) $i;long) ($i;wrap #$;Long)] [generate-int Int $i;long ($i;wrap #$;Long)] |