Alek Ratzloff dfac970cc7 Fix a bug with how line/col positions are calculated
Positions were being calculated by looking at the *first* character,
which would cause the same character to be visited twice. Now, if the
character is a null byte (\0), it won't advance the position at all.

The null byte should be a safe sentinel value to use because it
(hypothetically) shouldn't be showing up in a source file. This will
probably cause a hang if a file that starts with null bytes, but that's
a problem for future me.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-16 18:49:38 -08:00
2022-01-16 14:07:26 -08:00
2021-12-21 11:29:59 -08:00
2021-12-21 11:29:59 -08:00
Description
Bad stack-based language
1.9 MiB
Languages
Rust 100%