This commit is contained in:
crumbtoo
2024-01-15 11:05:10 -07:00
parent 3dfadc17ec
commit 4f66e71b9a

View File

@@ -115,7 +115,7 @@ alexGetByte inp = case inp ^. aiBytes of
& aiPrevChar .~ c
-- update the position
& aiPos %~ \ (ln,col) ->
if (inp ^. aiPrevChar) == '\n'
if c == '\n'
then (ln+1,1)
else (ln,col+1)
pure (b, inp')