summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2009-01-13 17:09:48 +0000
committersimonpj@microsoft.com <unknown>2009-01-13 17:09:48 +0000
commit97583b57b68d646a5735c995cf7be217a8e83ffe (patch)
treeb7b0cb34c9d1ede46c69762ceca6283e3fc84e2d /compiler/parser
parent62eeda5aed31173b234b2965ccf4bd6979ffd9a4 (diff)
downloadhaskell-97583b57b68d646a5735c995cf7be217a8e83ffe.tar.gz
Fix Trac #2931
Fix the lexical analyser when it encounters 'x<EOF> and Template Haskell is on.
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Lexer.x2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index e8f54ba6ad..b3b2336a63 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -1243,11 +1243,11 @@ lex_char_tok span _buf _len = do -- We've seen '
-- We've seen 'x, where x is a valid character
-- (i.e. not newline etc) but not a quote or backslash
case alexGetChar' i2 of -- Look ahead one more character
- Nothing -> lit_error
Just ('\'', i3) -> do -- We've seen 'x'
setInput i3
finish_char_tok loc c
_other -> do -- We've seen 'x not followed by quote
+ -- (including the possibility of EOF)
-- If TH is on, just parse the quote only
th_exts <- extension thEnabled
let (AI end _ _) = i1