aboutsummaryrefslogtreecommitdiff
path: root/lux-python
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-python
parentdec796a9838e39148c007f3f3d360964d7cb68de (diff)
Made inlined functions into first-class macros.
Diffstat (limited to 'lux-python')
-rw-r--r--lux-python/commands.md2
-rw-r--r--lux-python/project.lux2
-rw-r--r--lux-python/source/program.lux16
3 files changed, 11 insertions, 9 deletions
diff --git a/lux-python/commands.md b/lux-python/commands.md
index 869413fa7..c49f375f1 100644
--- a/lux-python/commands.md
+++ b/lux-python/commands.md
@@ -20,7 +20,7 @@ cd ~/lux/lux-python/ \
## Compile Lux's Standard Library's tests using a JVM-based compiler.
cd ~/lux/stdlib/ \
&& lux clean \
-&& java -jar ~/lux/lux-python/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux \
+&& java -jar ~/lux/lux-python/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux --program _ \
&& python3 ~/lux/stdlib/target/program.py
```
diff --git a/lux-python/project.lux b/lux-python/project.lux
index b9b95ff62..be674f0dc 100644
--- a/lux-python/project.lux
+++ b/lux-python/project.lux
@@ -21,4 +21,4 @@
["org.python" "jython-standalone" "2.7.2" "jar"]]
- "program" "program"]]
+ "program" program._]]
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index cf4398f89..8cbe4e0e4 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -29,10 +29,10 @@
["[0]" i64]]]
[meta
["[0]" static]
+ ["[0]" code]
[macro
["^" pattern]
- ["[0]" template]
- ["[0]" code]]
+ ["[0]" template]]
["@" target (.only)
["_" python]]
["[0]" compiler
@@ -56,7 +56,8 @@
[generation
["[0]" reference]
["[0]" python (.only)
- ["[0]" runtime]]]]]]
+ ["[0]" runtime]
+ ["[1]/[0]" reference]]]]]]
[default
["[0]" platform (.only Platform)]]
[meta
@@ -68,7 +69,7 @@
["[1]" script]]]]]
["[0]" world
["[0]" file]
- ["[1]/[0]" program]]]]
+ ["[1]/[0]" environment]]]]
[program
["/" compositor]])
@@ -538,7 +539,7 @@
platform.#phase_wrapper ..phase_wrapper
platform.#write (|>> _.code (at utf8.codec encoded))])))
-(def (program context program)
+(def (lux_program context program)
(Program (_.Expression Any) (_.Statement Any))
(all _.then
(_.import "sys")
@@ -553,7 +554,7 @@
(def (declare_success! _)
(-> Any (Async Any))
- (async.future (at world/program.default exit +0)))
+ (async.future (at world/environment.default exit +0)))
(def (scope body)
(-> (_.Statement Any) (_.Statement Any))
@@ -588,7 +589,8 @@
..platform
generation.bundle
(function.constant extension/bundle.empty)
- ..program
+ ..lux_program
+ (reference.constant python/reference.system)
[Register
(type_literal (_.Expression Any))
(type_literal (_.Statement Any))]