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.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user