microparsec
microparsec copied to clipboard
Nicer syntax for monadic parsing
The do-notation is the way to go in Haskell but might be the best solution in Nim. We could find an intermediate solution and encourage smaller, composable parsers at the same time.
We should be thinking about that together with #8.
EDIT: in Haskell, one would write something like
xml = do { name <- openTag
; content <- many xml
; endTagname
; pure (Node name content)
} <|> xmlText