aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/meta/extension.lux43
1 files changed, 26 insertions, 17 deletions
diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux
index 66bf59e0e..419570970 100644
--- a/stdlib/source/test/lux/meta/extension.lux
+++ b/stdlib/source/test/lux/meta/extension.lux
@@ -20,7 +20,7 @@
["[0]" random]
[number
["n" nat]]]
- [meta
+ ["[0]" meta (.only)
["[0]" code
["<[1]>" \\parser]]
[macro
@@ -54,6 +54,7 @@
["[0]" synthesis (.only)
["<[1]>" \\parser]]
[phase
+ ["[0]" extension]
[generation
(.,, (.for "JVM" (.,, (.these ["[0]" jvm
["[1]/[0]" runtime]]))
@@ -103,6 +104,11 @@
(phase archive pass_through))
... Generation
+ (def my_generation|generation
+ Generation
+ (generation (_ self phase archive [pass_through <synthesis>.any])
+ (phase archive pass_through)))
+
(analysis (..my_generation self phase archive [parameters (<>.some <code>.any)])
(let [! phase.monad]
(|> parameters
@@ -113,26 +119,26 @@
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
- (at ! each (|>> {synthesis.#Extension self})))))
-
- (generation (..my_generation self phase archive [pass_through <synthesis>.any])
- (phase archive pass_through))
+ (at ! each (|>> {synthesis.#Extension (symbol ..my_generation|generation)})))))
+
+ (def dummy_generation|generation
+ Generation
+ (generation (_ self phase archive [])
+ (let [self ..dummy_generation]
+ (at phase.monad in
+ (for @.jvm (jvm.string self)
+ @.js (js.string self)
+ @.python (python.unicode self)
+ @.lua (lua.string self)
+ @.ruby (ruby.string self)
+ @.php (php.string self)
+ @.scheme (scheme.string self))))))
(analysis (..dummy_generation self phase archive [])
(at phase.monad in {analysis.#Extension self (list)}))
(synthesis (..dummy_generation self phase archive [])
- (at phase.monad in {synthesis.#Extension self (list)}))
-
- (generation (..dummy_generation self phase archive [])
- (at phase.monad in
- (for @.jvm (jvm.string self)
- @.js (js.string self)
- @.python (python.unicode self)
- @.lua (lua.string self)
- @.ruby (ruby.string self)
- @.php (php.string self)
- @.scheme (scheme.string self))))
+ (at phase.monad in {synthesis.#Extension (symbol ..dummy_generation|generation) (list)}))
... Declaration
(declaration (..my_declaration self phase archive [expression <code>.any])
@@ -146,9 +152,12 @@
expressionS (declaration.lifted_synthesis
(synthesis_phase archive expressionA))
+ lux (<| declaration.lifted_analysis
+ extension.lifted
+ meta.compiler_state)
generation_phase declaration.generation
expressionG (declaration.lifted_generation
- (generation_phase archive expressionS))
+ (generation_phase lux archive expressionS))
_ (declaration.lifted_generation
(generation.with_new_context archive unit.none