aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/extension.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/extension.lux')
-rw-r--r--stdlib/source/lux/extension.lux9
1 files changed, 6 insertions, 3 deletions
diff --git a/stdlib/source/lux/extension.lux b/stdlib/source/lux/extension.lux
index 4b0b7e4d2..a4254807b 100644
--- a/stdlib/source/lux/extension.lux
+++ b/stdlib/source/lux/extension.lux
@@ -43,6 +43,7 @@
{#name Code
#label Text
#phase Text
+ #archive Text
#inputs (List Input)})
(def: (declaration default)
@@ -51,11 +52,12 @@
<c>.any
<c>.local-identifier
<c>.local-identifier
+ <c>.local-identifier
(<>.some (..input default)))))
(template [<any> <end> <and> <run> <extension> <name>]
[(syntax: #export (<name>
- {[name extension phase inputs] (..declaration (` <any>))}
+ {[name extension phase archive inputs] (..declaration (` <any>))}
body)
(let [g!parser (case (list@map product.right inputs)
#.Nil
@@ -64,10 +66,11 @@
parsers
(` (.$_ <and> (~+ parsers))))
g!name (code.local-identifier extension)
- g!phase (code.local-identifier phase)]
+ g!phase (code.local-identifier phase)
+ g!archive (code.local-identifier archive)]
(with-gensyms [g!handler g!inputs g!error]
(wrap (list (` (<extension> (~ name)
- (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!inputs))
+ (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs))
(.case ((~! <run>) (~ g!parser) (~ g!inputs))
(#.Right [(~+ (list@map (|>> product.left
code.local-identifier)