mirror of
https://github.com/mrkkrp/megaparsec.git
synced 2024-12-18 13:51:58 +03:00
4147b2b103
Even though the haddock for ‘Text.Megaparsec.Lexer.space’ says that Parsing of white space is an important part of any parser. We propose a convention where every lexeme parser assumes no spaces before the lexeme and consumes all spaces after the lexeme; all the indentation-sensitive parsing combinators assume/consume whitespace _before_ the thing to be parsed. This would normally mean they can't be used with combinators like ‘many’ and ‘some’ without using ‘try’ (and sacrificing performance). Fortunately ‘indentBlock’ also consumes whitespace _after_, but unfortunately it didn't do that in the ‘IndentNone’ case. Now it does and it works with many and some without try! |
||
---|---|---|
.. | ||
CharSpec.hs | ||
CombinatorSpec.hs | ||
ErrorSpec.hs | ||
ExprSpec.hs | ||
LexerSpec.hs | ||
PermSpec.hs | ||
PosSpec.hs | ||
PrimSpec.hs |