aboutsummaryrefslogtreecommitdiff
path: root/lux-lua
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
parentdec796a9838e39148c007f3f3d360964d7cb68de (diff)
Made inlined functions into first-class macros.
Diffstat (limited to 'lux-lua')
-rw-r--r--lux-lua/commands.md2
-rw-r--r--lux-lua/project.lux2
-rw-r--r--lux-lua/source/program.lux16
3 files changed, 11 insertions, 9 deletions
diff --git a/lux-lua/commands.md b/lux-lua/commands.md
index 6dd497307..6ffa0453e 100644
--- a/lux-lua/commands.md
+++ b/lux-lua/commands.md
@@ -20,7 +20,7 @@ cd ~/lux/lux-lua/ \
## Compile Lux's Standard Library's tests using a JVM-based compiler.
cd ~/lux/stdlib/ \
&& lein clean \
-&& java -jar ~/lux/lux-lua/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux \
+&& java -jar ~/lux/lux-lua/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux --program _ \
&& ~/lua-5.4.2/install/bin/lua ~/lux/stdlib/target/program.lua
```
diff --git a/lux-lua/project.lux b/lux-lua/project.lux
index 1e54cef63..b92be693a 100644
--- a/lux-lua/project.lux
+++ b/lux-lua/project.lux
@@ -29,5 +29,5 @@
["com.github.luxlang" "rembulan-stdlib" "0.1" "jar"]
["com.github.luxlang" "rembulan-compiler" "0.1" "jar"]]
- "program" "program"
+ "program" program._
"configuration" ["lua_compiler?" ""]]]
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]