diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-23 14:16:58 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-29 18:26:15 -0500 |
commit | b3027eb0a1c1b3cedbb54b0fc8d0924283a7cd25 (patch) | |
tree | 428241e11a6a5d15592964d049344b85d8160cf4 /compiler/GHC/Parser/Lexer.x | |
parent | f40b662b9ea555bab6e9729f4165eaca7021d322 (diff) | |
download | haskell-wip/stringbuffer.tar.gz |
StringBuffer: Rid it of ForeignPtrswip/stringbuffer
Bumps haddock submodule.
Diffstat (limited to 'compiler/GHC/Parser/Lexer.x')
-rw-r--r-- | compiler/GHC/Parser/Lexer.x | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x index 4d7b1ab157..2bf254b7c6 100644 --- a/compiler/GHC/Parser/Lexer.x +++ b/compiler/GHC/Parser/Lexer.x @@ -1894,7 +1894,7 @@ lex_string_tok span buf _len = do ITprimstring _ bs -> ITprimstring (SourceText src) bs ITstring _ s -> ITstring (SourceText src) s _ -> panic "lex_string_tok" - src = lexemeToString buf (cur bufEnd - cur buf) + src = lexemeToString buf (lengthStringBuffer buf - lengthStringBuffer bufEnd) return (L (mkPsSpan (psSpanStart span) end) tok') lex_string :: String -> P Token @@ -1994,7 +1994,7 @@ finish_char_tok buf loc ch -- We've already seen the closing quote -- Just need to check for trailing # = do magicHash <- getBit MagicHashBit i@(AI end bufEnd) <- getInput - let src = lexemeToString buf (cur bufEnd - cur buf) + let src = lexemeToString buf (lengthStringBuffer buf - lengthStringBuffer bufEnd) if magicHash then do case alexGetChar' i of Just ('#',i@(AI end _)) -> do |