aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/macro/syntax.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/macro/syntax.lux')
-rw-r--r--stdlib/source/lux/macro/syntax.lux15
1 files changed, 14 insertions, 1 deletions
diff --git a/stdlib/source/lux/macro/syntax.lux b/stdlib/source/lux/macro/syntax.lux
index 53ec26009..f5742d6ef 100644
--- a/stdlib/source/lux/macro/syntax.lux
+++ b/stdlib/source/lux/macro/syntax.lux
@@ -123,7 +123,7 @@
_
(#R;Success [tokens false]))))
-(def: #export (this! ast)
+(def: #export (this ast)
{#;doc "Ensures the given Code is the next input."}
(-> Code (Syntax Unit))
(function [tokens]
@@ -410,6 +410,19 @@
(function [inputs]
(run inputs (syntax (rec syntax)))))
+(def: #export (after param subject)
+ (All [p s] (-> (Syntax p) (Syntax s) (Syntax s)))
+ (do Monad<Syntax>
+ [_ param]
+ subject))
+
+(def: #export (before param subject)
+ (All [p s] (-> (Syntax p) (Syntax s) (Syntax s)))
+ (do Monad<Syntax>
+ [output subject
+ _ param]
+ (wrap output)))
+
## [Syntax]
(def: #hidden text.join-with text;join-with)