aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/generator/statement.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-06-12 21:14:55 -0400
committerEduardo Julian2017-06-12 21:14:55 -0400
commit9cd2927a4f6175784e081d6b512d3e900c8069e7 (patch)
treed1fe512bc84ea1e3a50ad86eeb3265771edd23c6 /new-luxc/source/luxc/generator/statement.jvm.lux
parentc50667a431a5ca67328a230f0c59956dc6ff43fa (diff)
- Renamed the "compilation" phase as the "generation" phase.
- Implemented compilation of primitives. - Implemented compilation of structures.
Diffstat (limited to 'new-luxc/source/luxc/generator/statement.jvm.lux')
-rw-r--r--new-luxc/source/luxc/generator/statement.jvm.lux25
1 files changed, 25 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/generator/statement.jvm.lux b/new-luxc/source/luxc/generator/statement.jvm.lux
new file mode 100644
index 000000000..96263181f
--- /dev/null
+++ b/new-luxc/source/luxc/generator/statement.jvm.lux
@@ -0,0 +1,25 @@
+(;module:
+ lux
+ (lux (control monad)
+ [io #- run]
+ (data [text "T/" Eq<Text>]
+ text/format)
+ [macro #+ Monad<Lux>])
+ (luxc ["&" base]
+ ["&;" module]
+ ["&;" env]
+ (compiler ["&;" expr])))
+
+(def: #export (compile-def def-name def-value def-meta)
+ (-> Text Code Code (Lux Unit))
+ (do Monad<Lux>
+ [=def-value (&expr;compile def-value)
+ =def-meta (&expr;compile def-meta)]
+ (undefined)))
+
+(def: #export (compile-program prog-args prog-body)
+ (-> Text Code (Lux Unit))
+ (do Monad<Lux>
+ [=prog-body (&env;with-local [prog-args (type (List Text))]
+ (&expr;compile prog-body))]
+ (undefined)))