aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/extension.lux100
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux10
2 files changed, 55 insertions, 55 deletions
diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux
index 58b5cd3fd..4ee1757d0 100644
--- a/stdlib/source/test/lux/extension.lux
+++ b/stdlib/source/test/lux/extension.lux
@@ -47,7 +47,7 @@
[language
[lux
["[0]" generation]
- ["[0]" directive]
+ ["[0]" declaration]
["[0]" analysis (.only)
["[0]" type]
["<[1]>" \\parser]]
@@ -60,7 +60,7 @@
(.~~ (.these))))]]]]]]
["_" test (.only Test)]]]
[\\library
- ["[0]" / (.only analysis synthesis generation directive)]])))
+ ["[0]" / (.only analysis synthesis generation declaration)]])))
(def dummy_generation "dummy generation")
@@ -72,7 +72,7 @@
[my_analysis]
[my_synthesis]
[my_generation]
- [my_directive]
+ [my_declaration]
)
... Generation
@@ -133,52 +133,52 @@
@.php (php.string self)
@.scheme (scheme.string self))))
- ... Directive
- (directive (..my_directive self phase archive [expression <code>.any])
- (do [! phase.monad]
- [analysis_phase directive.analysis
- expressionA (<| directive.lifted_analysis
- (type.expecting .Any)
- (analysis_phase archive expression))
-
- synthesis_phase directive.synthesis
- expressionS (directive.lifted_synthesis
- (synthesis_phase archive expressionA))
-
- generation_phase directive.generation
- expressionG (directive.lifted_generation
- (generation_phase archive expressionS))
-
- _ (directive.lifted_generation
- (generation.with_new_context archive unit.none
- (do !
- [[module_id artifact_id] (generation.context archive)
- .let [commentary (format "Successfully installed directive " (%.text self) "!")]
- _ (generation.save! artifact_id {.#None}
- (for @.jvm (let [$class (jvm/runtime.class_name [module_id artifact_id])]
- (<| [$class]
- (try.else (binary.empty 0))
- (try#each (binaryF.result class.format))
- (class.class version.v6_0 class.public
- (name.internal $class)
- {.#None}
- (name.internal "java.lang.Object")
- (list)
- (list)
- (list)
- sequence.empty)))
- @.js (js.comment commentary
- (js.statement (js.string commentary)))
- @.python (python.comment commentary
- (python.statement (python.string commentary)))
- @.lua (lua.comment commentary
- (lua.statement expressionG))
- @.ruby (ruby.comment commentary
- (ruby.statement (ruby.string commentary)))))]
- (generation.log! commentary))))]
- (in directive.no_requirements)))
-
- (`` ((~~ (static ..my_directive)) (n.* 2 3)))
+ ... Declaration
+ (declaration (..my_declaration self phase archive [expression <code>.any])
+ (do [! phase.monad]
+ [analysis_phase declaration.analysis
+ expressionA (<| declaration.lifted_analysis
+ (type.expecting .Any)
+ (analysis_phase archive expression))
+
+ synthesis_phase declaration.synthesis
+ expressionS (declaration.lifted_synthesis
+ (synthesis_phase archive expressionA))
+
+ generation_phase declaration.generation
+ expressionG (declaration.lifted_generation
+ (generation_phase archive expressionS))
+
+ _ (declaration.lifted_generation
+ (generation.with_new_context archive unit.none
+ (do !
+ [[module_id artifact_id] (generation.context archive)
+ .let [commentary (format "Successfully installed declaration " (%.text self) "!")]
+ _ (generation.save! artifact_id {.#None}
+ (for @.jvm (let [$class (jvm/runtime.class_name [module_id artifact_id])]
+ (<| [$class]
+ (try.else (binary.empty 0))
+ (try#each (binaryF.result class.format))
+ (class.class version.v6_0 class.public
+ (name.internal $class)
+ {.#None}
+ (name.internal "java.lang.Object")
+ (list)
+ (list)
+ (list)
+ sequence.empty)))
+ @.js (js.comment commentary
+ (js.statement (js.string commentary)))
+ @.python (python.comment commentary
+ (python.statement (python.string commentary)))
+ @.lua (lua.comment commentary
+ (lua.statement expressionG))
+ @.ruby (ruby.comment commentary
+ (ruby.statement (ruby.string commentary)))))]
+ (generation.log! commentary))))]
+ (in declaration.no_requirements)))
+
+ (`` ((~~ (static ..my_declaration)) (n.* 2 3)))
))
(def .public test
@@ -201,6 +201,6 @@
(`` ((~~ (static ..my_generation)) expected)))
(text#= ..dummy_generation
(`` ((~~ (static ..dummy_generation))))))))
- (_.coverage [/.directive]
+ (_.coverage [/.declaration]
true)
)))))
diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
index 53d3abd61..a2d2d77bf 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
@@ -114,8 +114,8 @@
[/.definition (is category.Definition [expected_name {.#None}]) /.definitions category.#Definition /.analyser expected_name]
[/.analyser expected_name /.analysers category.#Analyser /.synthesizer expected_name]
[/.synthesizer expected_name /.synthesizers category.#Synthesizer /.generator expected_name]
- [/.generator expected_name /.generators category.#Generator /.directive expected_name]
- [/.directive expected_name /.directives category.#Directive /.custom expected_name]
+ [/.generator expected_name /.generators category.#Generator /.declaration expected_name]
+ [/.declaration expected_name /.declarations category.#Declaration /.custom expected_name]
[/.custom expected_name /.customs category.#Custom /.definition (is category.Definition [expected_name {.#None}])]
))
(_.coverage [/.id]
@@ -130,7 +130,7 @@
[/.analyser expected_name |>]
[/.synthesizer expected_name |>]
[/.generator expected_name |>]
- [/.directive expected_name |>]
+ [/.declaration expected_name |>]
[/.custom expected_name |>]
))))
(_.coverage [/.artifacts]
@@ -155,7 +155,7 @@
[/.analyser /.analysers text.equivalence (|>>)]
[/.synthesizer /.synthesizers text.equivalence (|>>)]
[/.generator /.generators text.equivalence (|>>)]
- [/.directive /.directives text.equivalence (|>>)]
+ [/.declaration /.declarations text.equivalence (|>>)]
[/.custom /.customs text.equivalence (|>>)]
))))
(_.coverage [/.format /.parser]
@@ -174,7 +174,7 @@
[/.analyser expected_name |>]
[/.synthesizer expected_name |>]
[/.generator expected_name |>]
- [/.directive expected_name |>]
+ [/.declaration expected_name |>]
[/.custom expected_name |>]
))))
)))))