Fixing bugs, pointer arithmetic checking, better for, working on first program

This commit is contained in:
Krzosa Karol
2022-06-06 23:50:38 +02:00
parent 729e7aee86
commit f852a23fcb
8 changed files with 127 additions and 50 deletions

View File

@@ -1,11 +1,21 @@
Lex_Stream :: struct
stream: *U8
end : *U8
Token :: struct
str: *U8
len: S64
main :: (): int
is_numeric :: (c: U8): Bool
result := c >= '0 && c <= '9
return result
entry :: ()
string_to_lex := "Identifier 2425525 Not_Number"
t: Token
for i := 0, i < string_to_lex.len, i+=1
string_to_lex.str[0] = 64
if is_numeric(string_to_lex.str[i])
t.str = &string_to_lex.str[i]
for is_numeric(string_to_lex.str[i])
i+=1