X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FLexer.x;h=8ef2071b482cbef5c905e599c3f73d3222106f7a;hp=f6863c6286083b64ae1136f9bb08fa95a40c93f5;hb=33989e6eb745ca9d54ba638bc89bec7660cba4be;hpb=06855066dcd2533094f2a8f877753e2c03d6f656 diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index f6863c6..8ef2071 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -216,6 +216,11 @@ $white_no_nl+ ; "{-#" $whitechar* (INCLUDE|include) { lex_string_prag ITinclude_prag } } +<0,option_prags,glaexts> { + -- This is to catch things like {-# OPTIONS OPTIONS_HUGS ... + "{-#" $whitechar* $idchar+ { nested_comment } +} + -- '0' state: ordinary lexemes -- 'glaexts' state: glasgow extensions (postfix '#', etc.)