From 53f4081f6f66c86de2ae8ce22680165359ab2c60 Mon Sep 17 00:00:00 2001 From: "M.V. Hutz" Date: Mon, 12 Jan 2026 20:59:34 -0500 Subject: [PATCH] fix: correct loop condition in comment parsing The loop was checking 'for i.Done()' instead of 'for !i.Done()', which prevented the comment content from being consumed. This caused the tokenizer to treat comment text as code. --- pkg/saccharine/token/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/saccharine/token/parse.go b/pkg/saccharine/token/parse.go index 3848e5e..b7d5033 100644 --- a/pkg/saccharine/token/parse.go +++ b/pkg/saccharine/token/parse.go @@ -79,7 +79,7 @@ func getToken(i *iterator.Iterator[rune]) (*Token, error) { return NewHardBreak(index), nil case letter == '#': // Skip everything until the next newline or EOF. - for i.Done() { + for !i.Done() { r, err := i.Next() if err != nil { return nil, trace.Wrap(err, "error while parsing comment")