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:
709c9ce
)
FIX #3153: we lost an EOF sentinel in the event of a lexical error
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 21 Apr 2009 09:45:58 +0000
(09:45 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 21 Apr 2009 09:45:58 +0000
(09:45 +0000)
compiler/main/HeaderInfo.hs
patch
|
blob
|
history
diff --git
a/compiler/main/HeaderInfo.hs
b/compiler/main/HeaderInfo.hs
index
89f4661
..
0fd62f5
100644
(file)
--- a/
compiler/main/HeaderInfo.hs
+++ b/
compiler/main/HeaderInfo.hs
@@
-123,8
+123,9
@@
lazyGetToks dflags filename handle = do
_other -> do rest <- lazyLexBuf handle state' eof
return (t : rest)
_ | not eof -> getMore handle state
- | otherwise -> return []
-
+ | otherwise -> return [L (last_loc state) ITeof]
+ -- parser assumes an ITeof sentinel at the end
+
getMore :: Handle -> PState -> IO [Located Token]
getMore handle state = do
-- pprTrace "getMore" (text (show (buffer state))) (return ())