From 44f823afce2bdb7332cd457a1a6f1d001f91e8e0 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Fri, 17 Oct 2025 21:25:17 -0400 Subject: [PATCH] Correct parser end_pos for multiline strings --- core/odin/parser/parser.odin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/odin/parser/parser.odin b/core/odin/parser/parser.odin index 94ea649f9..7ebe275ed 100644 --- a/core/odin/parser/parser.odin +++ b/core/odin/parser/parser.odin @@ -99,10 +99,8 @@ end_pos :: proc(tok: tokenizer.Token) -> tokenizer.Pos { pos := tok.pos pos.offset += len(tok.text) - if tok.kind == .Comment { - if tok.text[:2] != "/*" { - pos.column += len(tok.text) - } else { + if tok.kind == .Comment || tok.kind == .String { + if tok.text[:2] == "/*" || tok.text[:1] == "`" { for i := 0; i < len(tok.text); i += 1 { c := tok.text[i] if c == '\n' { @@ -112,6 +110,8 @@ end_pos :: proc(tok: tokenizer.Token) -> tokenizer.Pos { pos.column += 1 } } + } else { + pos.column += len(tok.text) } } else { pos.column += len(tok.text)