@@ -320,7 +320,7 @@ totoks pos t =
320 : totoks (incSourceColumn pos (1 + T.length cs)) rest'
320 : totoks (incSourceColumn pos (1 + T.length cs)) rest'
321 | c == '\\' ->
321 | c == '\\' ->
322 case T.uncons rest of
322 case T.uncons rest of
323− Nothing -> [Tok pos Symbol (T.singleton c)]
323+ Nothing -> [Tok pos (CtrlSeq " ") "\\"]
324 Just (d, rest')
324 Just (d, rest')
325 | isLetterOrAt d ->
325 | isLetterOrAt d ->
326 -- \makeatletter is common in macro defs;
326 -- \makeatletter is common in macro defs;
@@ -338,7 +338,7 @@ totoks pos t =
338 Just ('\n', r2)
338 Just ('\n', r2)
339 -> (T.pack "\n",
339 -> (T.pack "\n",
340 T.span isSpaceOrTab r2)
340 T.span isSpaceOrTab r2)
341− _ -> (mempty, (w1, r1))
341+ _ -> (mempty, (mempty, r1))
342 in case T.uncons r3 of
342 in case T.uncons r3 of
343 Just ('\n', _) ->
343 Just ('\n', _) ->
344 Tok pos (CtrlSeq " ") ("\\" <> w1)
344 Tok pos (CtrlSeq " ") ("\\" <> w1)