diff options
author | Eduardo Julian | 2019-04-16 20:55:39 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-16 20:55:39 -0400 |
commit | 1062b6e456aa0b446b81a706e41df6e546c5ad44 (patch) | |
tree | 93d0ae5cdf2e555ab4d76ef2b82ff7f0c0dcdac3 /new-luxc/source | |
parent | 195ffc9a9de68259a5fb54cdee065efeb703c388 (diff) |
Now using generation for host extensions.
Diffstat (limited to 'new-luxc/source')
-rw-r--r-- | new-luxc/source/program.lux | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux index 23384cf17..661858e40 100644 --- a/new-luxc/source/program.lux +++ b/new-luxc/source/program.lux @@ -1,6 +1,6 @@ (.module: [lux #* - ["." host (#+ import:)] + ["@" host (#+ import:)] [abstract [monad (#+ do)]] [control @@ -9,7 +9,8 @@ [data ["." error (#+ Error)] [collection - [array (#+ Array)]]] + [array (#+ Array)] + ["." dictionary]]] [world ["." file]] [tool @@ -33,7 +34,8 @@ ["." runtime] ["." expression] [procedure - ["." common]]]]]]) + ["." common] + ["." host]]]]]]) (import: #long java/lang/reflect/Method (invoke [java/lang/Object (Array java/lang/Object)] #try java/lang/Object)) @@ -46,13 +48,13 @@ (def: _object-class (java/lang/Class java/lang/Object) - (host.class-for java/lang/Object)) + (@.class-for java/lang/Object)) (def: _apply-args (Array (java/lang/Class java/lang/Object)) - (|> (host.array (java/lang/Class java/lang/Object) 2) - (host.array-write 0 _object-class) - (host.array-write 1 _object-class))) + (|> (@.array (java/lang/Class java/lang/Object) 2) + (@.array-write 0 _object-class) + (@.array-write 1 _object-class))) (def: (expander macro inputs lux) Expander @@ -64,9 +66,9 @@ (:coerce (Error (Error [Lux (List Code)])) (java/lang/reflect/Method::invoke (:coerce java/lang/Object macro) - (|> (host.array java/lang/Object 2) - (host.array-write 0 (:coerce java/lang/Object inputs)) - (host.array-write 1 (:coerce java/lang/Object lux))) + (|> (@.array java/lang/Object 2) + (@.array-write 0 (:coerce java/lang/Object inputs)) + (@.array-write 1 (:coerce java/lang/Object lux))) apply-method)))) (def: jvm @@ -145,4 +147,9 @@ $i.RETURN))))])) (program: [{service /cli.service}] - (/.compiler ..expander ..jvm common.bundle ..program service)) + (/.compiler ..expander + ..jvm + (dictionary.merge common.bundle + host.bundle) + ..program + service)) |