From 6d024e6a0c90404e9fd1921d97a838a19b5b135d Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Mon, 13 Jul 2026 23:52:09 +0200 Subject: [PATCH] streamline `scan(-)` --- source/main.hon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/main.hon b/source/main.hon index c4889eb..9da185e 100644 --- a/source/main.hon +++ b/source/main.hon @@ -73,6 +73,7 @@ scan func(tokens @mut std.ArrayList(Token), input []u8) void ! mem.AllocError { if char == '\n' { try arraylist.append(tokens, Token{ kind = .newline, start = cursor }) cursor += 1 + continue } else if _is_whitespace(char) { cursor += 1 continue @@ -81,6 +82,8 @@ scan func(tokens @mut std.ArrayList(Token), input []u8) void ! mem.AllocError { # comments if char == '#' { while cursor < input.len and input[cursor] != '\n' : cursor += 1 {} + cursor += 1 + continue } # identifiers and keywords