Add Text.Parsing.Parser.Language and Token modules.#27
Add Text.Parsing.Parser.Language and Token modules.#27paf31 merged 6 commits intopurescript-contrib:masterfrom
Conversation
This commit adds the `Text.Parsing.Parser.Language` and
`Text.Parsing.Parser.Token` modules. This is a straight port of modules
of the same name in Haskell's `parsec` library.
This commit also adds the `(<??>)` combinator, which acts like a flipped
`(<?>)`. It is convenient to use with monadic parsers:
```purescript
foo :: Parser String Unit
foo = "some message" <??> do
string "foo"
bar
pure unit
```
|
One small problem I couldn't figure out was the functions near the bottom of the I tried to put them in the
I moved the functions in question to the top level and the problems disappered. |
bower.json
Outdated
There was a problem hiding this comment.
You should publish this to bower. Never actually commit git dependencies, especially when it's not a SHA.
There was a problem hiding this comment.
@michaelficarra Thanks for taking a look at this PR.
I am planning to publish purescript-unicode to bower, but I am waiting for this PR to get reviewed.
I don't think I explained it well enough in the PR comments, but this PR shouldn't be merged until purescript-unicode is released. (Or if we decide not to use the purescript-unicode dependency, then it doesn't matter.)
|
What @michaelficarra said, plus a few code comments from me, plus:
Thanks very much for working on this! |
|
@paf31, Thanks for taking the time to review the code. I have made the following changes:
Now this PR should be ready for merging. (Or at least additional review.) |
|
Sorry, I'm catching up on PRs. I'll get to this soon! |
|
No worries! |
Add Text.Parsing.Parser.Language and Token modules.
|
Thanks very much! And sorry again for the delay. |
This commit adds the
Text.Parsing.Parser.LanguageandText.Parsing.Parser.Tokenmodules. This is a straight port of modulesof the same name in Haskell's
parseclibrary.Text.Parsec.LanguageText.Parsec.TokenThis commit also adds the
(<??>)combinator, which acts like a flipped(<?>). It is convenient to use with monadic parsers: