From 9cd2927a4f6175784e081d6b512d3e900c8069e7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 12 Jun 2017 21:14:55 -0400 Subject: - Renamed the "compilation" phase as the "generation" phase. - Implemented compilation of primitives. - Implemented compilation of structures. --- new-luxc/source/luxc/generator/statement.jvm.lux | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 new-luxc/source/luxc/generator/statement.jvm.lux (limited to 'new-luxc/source/luxc/generator/statement.jvm.lux') 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/format) + [macro #+ Monad]) + (luxc ["&" base] + ["&;" module] + ["&;" env] + (compiler ["&;" expr]))) + +(def: #export (compile-def def-name def-value def-meta) + (-> Text Code Code (Lux Unit)) + (do Monad + [=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 + [=prog-body (&env;with-local [prog-args (type (List Text))] + (&expr;compile prog-body))] + (undefined))) -- cgit v1.2.3