parsec icon indicating copy to clipboard operation
parsec copied to clipboard

add a parameter to makeTokenParser to specify options for treating space by lexeme

Open ciez opened this issue 3 years ago • 0 comments

Sometimes space around tokens matters a lot. Take Haskell dot for example.

This proposal is to add a parameter to makeTokenParser

https://github.com/haskell/parsec/blob/38dfc545874dd44c26382d8dd692eb533396c6f5/src/Text/Parsec/Token.hs#L358-L361

which would explicitly specify lexeme options:

  • consume trailing space
  • do not consume trailing space

ciez avatar May 01 '21 08:05 ciez