From feacd79496ae9c76492d5a12d30b78724b642654 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 26 Jul 2022 18:08:04 -0400 Subject: Made inlined functions into first-class macros. --- lux-lua/source/program.lux | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lux-lua/source') 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] -- cgit v1.2.3