Added unary ++ --, prefix and postfix, working on running a program

This commit is contained in:
Krzosa Karol
2022-06-07 09:05:02 +02:00
parent d3da979d64
commit c5b82c0532
6 changed files with 51 additions and 15 deletions

View File

@@ -39,13 +39,19 @@ Bool is_numeric(U8 c){
}
void entry(){
String string_to_lex = LIT("Identifier 2425525 Not_Number");
Token token_array[32];
U32 token_count;
Token t;
for(S64 i = 0;(i<string_to_lex.len);(i+=1)){
if(is_numeric((string_to_lex.str[i]))){
(t.str=(&(string_to_lex.str[i])));
(t.len=i);
for(;is_numeric((string_to_lex.str[i]));){
(i+=1);
}
(t.len=(i-t.len));
((token_array[(token_count++)])=t);
(token_count+=1);
}
}
}