From: simonmar Date: Mon, 12 Dec 2005 14:22:30 +0000 (+0000) Subject: [project @ 2005-12-12 14:22:30 by simonmar] X-Git-Tag: final_switch_to_darcs,_this_repo_is_now_live~101 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=b9bf4ab28ad7bd7c33e08065859a3add2660707d [project @ 2005-12-12 14:22:30 by simonmar] Prevent --: from being interpreted as a comment --- diff --git a/ghc/compiler/parser/Lexer.x b/ghc/compiler/parser/Lexer.x index 407b5fa..eb00e90 100644 --- a/ghc/compiler/parser/Lexer.x +++ b/ghc/compiler/parser/Lexer.x @@ -109,7 +109,7 @@ $white_no_nl+ ; -- have to exclude those. -- The regex says: "munch all the characters after the dashes, as long as -- the first one is not a symbol". -"--"\-* [^$symbol] .* ; +"--"\-* [^$symbol :] .* ; "--"\-* / { atEOL } ; -- 'bol' state: beginning of a line. Slurp up all the whitespace (including