diff options
author | Eduardo Julian | 2019-09-07 01:50:37 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-09-07 01:50:37 -0400 |
commit | b63ac226cc2ea843f08f7c72b18d22602462c624 (patch) | |
tree | 7fb72562c39549108b7a48c1a6819c9bd3a64dab /stdlib/source/lux/control/parser/text.lux | |
parent | 181f93f3e963c9738ed60f6f5e2d2a37253a0b1b (diff) |
Modified compiler's machinery to use the new abstractions for descriptors and signatures.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/control/parser/text.lux | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/stdlib/source/lux/control/parser/text.lux b/stdlib/source/lux/control/parser/text.lux index bec295f39..44d568eaf 100644 --- a/stdlib/source/lux/control/parser/text.lux +++ b/stdlib/source/lux/control/parser/text.lux @@ -345,7 +345,7 @@ {#.doc "Run a parser with the given input, instead of the real one."} (All [a] (-> Text (Parser a) (Parser a))) (function (_ real-input) - (case (run parser local-input) + (case (..run parser local-input) (#try.Failure error) (#try.Failure error) @@ -363,3 +363,12 @@ #.None (exception.throw ..cannot-slice []))))) + +(def: #export (embed structured text) + (All [s a] + (-> (Parser a) + (//.Parser s Text) + (//.Parser s a))) + (do //.monad + [raw text] + (//.lift (..run structured raw)))) |