summaryrefslogtreecommitdiff
path: root/ghc/compiler/parser/Lexer.x
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-12-12 14:22:30 +0000
committersimonmar <unknown>2005-12-12 14:22:30 +0000
commitb9bf4ab28ad7bd7c33e08065859a3add2660707d (patch)
tree4351810da96e27506ef8c8b437698618df8902d2 /ghc/compiler/parser/Lexer.x
parent39208cd2805a1c9b22e541e7826c7f9e6f56f680 (diff)
downloadhaskell-b9bf4ab28ad7bd7c33e08065859a3add2660707d.tar.gz
[project @ 2005-12-12 14:22:30 by simonmar]
Prevent --: from being interpreted as a comment
Diffstat (limited to 'ghc/compiler/parser/Lexer.x')
-rw-r--r--ghc/compiler/parser/Lexer.x2
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/compiler/parser/Lexer.x b/ghc/compiler/parser/Lexer.x
index 407b5fa516..eb00e90613 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