mirrored from https://gitlab.haskell.org/ghc/ghc.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak the lexer: In particular, improve notFollowedBy and friends
We were hitting a problem when reading the LANGUAGE/OPTIONS pragmas from GHC.TypeLits, where the buffer ended "{-". The rules for the start-comment lexeme check that "{-" is not followed by "#", but the test returned False when there was no next character. Therefore we were lexing this as as an open-curly lexeme (only consuming the "{", and not reaching the end of the buffer), which meant the options parser think that it had reached the end of the options. Now we correctly lex as "{-".
- Loading branch information
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters