aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2017-04-14 23:07:13 -0400
committerEduardo Julian2017-04-14 23:07:13 -0400
commitf619a094d6044635176bd2736f8fd0ca1c7372d9 (patch)
tree827ee0a2797d66699a99c0ec327b28cda1ca5690
parentde9d2c8f69eee373d4940798b30be4aeaf7652bc (diff)
- Added a new way to sequentially combine text lexers.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/text/lexer.lux7
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/source/lux/data/text/lexer.lux b/stdlib/source/lux/data/text/lexer.lux
index e43d87bd9..9146ca136 100644
--- a/stdlib/source/lux/data/text/lexer.lux
+++ b/stdlib/source/lux/data/text/lexer.lux
@@ -510,3 +510,10 @@
(if (Text/= "" unconsumed)
(#E;Success [real-input value])
(#E;Error ($_ Text/append "Unconsumed input: " unconsumed))))))
+
+(def: #export (seq' left right)
+ (-> (Lexer Text) (Lexer Text) (Lexer Text))
+ (do Monad<Lexer>
+ [=left left
+ =right right]
+ (wrap (Text/append =left =right))))