mem helpers and # comment support

This commit is contained in:
IgorCielniak
2025-12-06 17:24:30 +01:00
parent 8e8faf3c91
commit 643a4960c2
3 changed files with 82 additions and 1 deletions

View File

@@ -58,7 +58,13 @@ class Reader:
token_start = 0
token_line = 1
token_column = 0
for char in source:
source_len = len(source)
while index < source_len:
char = source[index]
if char == "#":
while index < source_len and source[index] != "\n":
index += 1
continue
if char.isspace():
if lexeme:
yield Token(