Fix comment parsing (#118)
Fixes #117
I broke comment parsing in 52d097eba3
due to
accidentally changing how `token` behaves. What was supposed to be a
behavior-preserving simplification actually broke parsing of comments within
the internal whitespace of an expression
The root of the problem was that `token` used to correctly use the `whitespace`
parser for `Dhall.Parser.Parser`, which correctly parses comments, but after
the breaking change `token` would defer to the behavior of `whitespace` for
`Text.Trifecta.Parser`, which does not support parsing comments
The correct simplification is to omit the definition of `token` altogether,
because the default implementation matches the correct implementation. This
change updates `token` to default to the right implementation
This commit is contained in:
parent
d0f5b9aac2
commit
0791fc2ed0
|
@ -101,8 +101,6 @@ instance TokenParsing Parser where
|
|||
|
||||
highlight h (Parser m) = Parser (highlight h m)
|
||||
|
||||
token parser = Parser (token (unParser parser))
|
||||
|
||||
identifierStyle :: IdentifierStyle Parser
|
||||
identifierStyle = IdentifierStyle
|
||||
{ _styleName = "dhall"
|
||||
|
|
Loading…
Reference in New Issue
Block a user