aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/ffi/export.js.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/ffi/export.js.lux66
1 files changed, 33 insertions, 33 deletions
diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux
index e40ea1964..a887d9f84 100644
--- a/stdlib/source/library/lux/ffi/export.js.lux
+++ b/stdlib/source/library/lux/ffi/export.js.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except)
- [extension (.only directive)]
+ [extension (.only declaration)]
["[0]" meta]
["[0]" static]
[abstract
@@ -32,7 +32,7 @@
[language
[lux
["[0]" generation]
- ["[0]" directive]
+ ["[0]" declaration]
[analysis
["[0]" type]]]]]]]])
@@ -49,41 +49,41 @@
(with_expansions [<extension> (static.random (|>> %.nat (%.format "lua export ") code.text)
random.nat)]
- (directive (<extension> self phase archive [name <code>.text
- term <code>.any])
- (do [! phase.monad]
- [next directive.analysis
- [_ term] (<| directive.lifted_analysis
- type.inferring
- (next archive term))
+ (declaration (<extension> self phase archive [name <code>.text
+ term <code>.any])
+ (do [! phase.monad]
+ [next declaration.analysis
+ [_ term] (<| declaration.lifted_analysis
+ type.inferring
+ (next archive term))
- next directive.synthesis
- term (directive.lifted_synthesis
- (next archive term))
+ next declaration.synthesis
+ term (declaration.lifted_synthesis
+ (next archive term))
- dependencies (directive.lifted_generation
- (dependency.dependencies archive term))
+ dependencies (declaration.lifted_generation
+ (dependency.dependencies archive term))
- next directive.generation
- [interim_artifacts term] (directive.lifted_generation
- (generation.with_interim_artifacts archive
- (next archive term)))
+ next declaration.generation
+ [interim_artifacts term] (declaration.lifted_generation
+ (generation.with_interim_artifacts archive
+ (next archive term)))
- _ (directive.lifted_generation
- (do !
- [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts))
- .let [$module (/.var "module")
- $exports (/.the "exports" $module)
- definition (/.define (/.var name) term)
- export (/.when (/.not (/.= (/.string "undefined") (/.type_of $module)))
- (/.set (/.the name $exports) (/.var name)))
- code (all /.then
- definition
- export)]
- _ (generation.execute! definition)
- _ (generation.save! @self {.#None} code)]
- (generation.log! (%.format "Export " (%.text name)))))]
- (in directive.no_requirements)))
+ _ (declaration.lifted_generation
+ (do !
+ [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts))
+ .let [$module (/.var "module")
+ $exports (/.the "exports" $module)
+ definition (/.define (/.var name) term)
+ export (/.when (/.not (/.= (/.string "undefined") (/.type_of $module)))
+ (/.set (/.the name $exports) (/.var name)))
+ code (all /.then
+ definition
+ export)]
+ _ (generation.execute! definition)
+ _ (generation.save! @self {.#None} code)]
+ (generation.log! (%.format "Export " (%.text name)))))]
+ (in declaration.no_requirements)))
(def .public export
(syntax (_ [exports (<>.many <code>.any)])