Label loops

This commit is contained in:
2025-04-12 12:05:32 +02:00
parent 6fd1bda112
commit 8ec407515a
9 changed files with 134 additions and 103 deletions

View File

@ -1,7 +1,7 @@
const
SEEK_SET* = 0;
SEEK_CUR* = 1;
SEEK_END* = 2;
SEEK_SET* := 0;
SEEK_CUR* := 1;
SEEK_END* := 2;
type
TokenKind* = (
@ -404,9 +404,15 @@ begin
end
proc skip_spaces(source_code: ^SourceCode);
var
current: Char;
begin
while ~source_code_empty(source_code) & is_space(source_code_head(source_code^)) do
if source_code_head(source_code^) = '\n' then
while ~source_code_empty(source_code), loop do
current := source_code_head(source_code^);
if ~is_space(current) then
break loop
elsif current = '\n' then
source_code_break(source_code)
end;
source_code_advance(source_code)