aboutsummaryrefslogtreecommitdiff
path: root/lux-lua/source
diff options
context:
space:
mode:
authorEduardo Julian2022-07-26 18:08:04 -0400
committerEduardo Julian2022-07-26 18:08:04 -0400
commitfeacd79496ae9c76492d5a12d30b78724b642654 (patch)
treea85708d1bfe43a98ba62b7f8589dcc95a71f86f5 /lux-lua/source
parentdec796a9838e39148c007f3f3d360964d7cb68de (diff)
Made inlined functions into first-class macros.
Diffstat (limited to 'lux-lua/source')
-rw-r--r--lux-lua/source/program.lux16
1 files changed, 9 insertions, 7 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index 150feec52..e1de9fdb0 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -27,10 +27,10 @@
["[0]" i64]]]
[meta
["[0]" static]
+ ["[0]" code]
[macro
["^" pattern]
- ["[0]" local]
- ["[0]" code]]
+ ["[0]" local]]
["@" target (.only)
["_" lua]]
["[0]" compiler
@@ -53,7 +53,8 @@
[generation
["[0]" reference]
["[0]" lua (.only)
- ["[0]" runtime]]]]]]
+ ["[0]" runtime]
+ ["[1]/[0]" reference]]]]]]
[default
["[0]" platform (.only Platform)]]
[meta
@@ -64,7 +65,7 @@
["[1]" script]]]]]
["[0]" world
["[0]" file]
- ["[1]/[0]" program]]]]
+ ["[1]/[0]" environment]]]]
[program
["/" compositor]])
@@ -866,7 +867,7 @@
platform.#phase_wrapper ..phase_wrapper
platform.#write (|>> _.code (at utf8.codec encoded))])))))
-(def (program context program)
+(def (lux_program context program)
(Program _.Expression _.Statement)
(let [$program (_.var (reference.artifact context))]
(_.statement (_.apply (list (runtime.lux//program_args (_.var "arg"))
@@ -875,7 +876,7 @@
(def (declare_success! _)
(-> Any (Async Any))
- (async.future (at world/program.default exit +0)))
+ (async.future (at world/environment.default exit +0)))
(def (lux_compiler it)
(-> Any platform.Custom)
@@ -899,7 +900,8 @@
(io.io platform)
generation.bundle
(function.constant extension/bundle.empty)
- ..program
+ ..lux_program
+ (reference.constant lua/reference.system)
[(type_literal [Register _.Label])
_.Expression
_.Statement]