projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0685506
)
do a better job of ignoring unrecognised pragmas
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 12 Jul 2006 08:35:50 +0000
(08:35 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 12 Jul 2006 08:35:50 +0000
(08:35 +0000)
compiler/parser/Lexer.x
patch
|
blob
|
history
diff --git
a/compiler/parser/Lexer.x
b/compiler/parser/Lexer.x
index
f6863c6
..
8ef2071
100644
(file)
--- 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.)