~mrms/jsonum

1f7d38423cf79787fabca9bf90ccbfac5a4e5cb5 — Marek Maškarinec 8 months ago 52b07c5
Fix CR handling

Signed-off-by: Marek Maškarinec <marek@mrms.cz>
1 files changed, 1 insertions(+), 1 deletions(-)

M json.um
M json.um => json.um +1 -1
@@ 96,7 96,7 @@ fn (l: ^lexer) lex_space(): str {
}

fn (l: ^lexer) lex_next(): (token, bool) {
	for l.pos < l.len && (l.inp[l.pos] == ' ' || l.inp[l.pos] == '\n' || l.inp[l.pos] == '\t') {
	for l.pos < l.len && (l.inp[l.pos] == ' ' || l.inp[l.pos] == '\n' || l.inp[l.pos] == '\r' || l.inp[l.pos] == '\t') {
		if l.inp[l.pos] == '\n' {
			l.lineno++
		}