feat: add comment support to saccharine language #25

Merged
mvhutz merged 3 commits from feat/comment-support into main 2026-01-13 02:00:01 +00:00
Showing only changes of commit 53f4081f6f - Show all commits

View File

@@ -79,7 +79,7 @@ func getToken(i *iterator.Iterator[rune]) (*Token, error) {
return NewHardBreak(index), nil return NewHardBreak(index), nil
case letter == '#': case letter == '#':
// Skip everything until the next newline or EOF. // Skip everything until the next newline or EOF.
for i.Done() { for !i.Done() {
r, err := i.Next() r, err := i.Next()
if err != nil { if err != nil {
return nil, trace.Wrap(err, "error while parsing comment") return nil, trace.Wrap(err, "error while parsing comment")