adding strlits

This commit is contained in:
2025-11-05 15:27:57 +03:00
parent a8c8870c33
commit db4eb9bf6f
2 changed files with 34 additions and 28 deletions

View File

@@ -2,10 +2,11 @@
int main(void){
const char ts[] = "\"hello\" hi"; // = 3
Token tk = tokenize_all(ts);
const char ts[] = "\"hello\" hi + 2";
const char math[] = "((1+2)*6)/18"; // = 1
Token tk = tokenize_all(math);
for (size_t i=0; i<tk.size; ++i){
printf("TokenNum: %zu Type: %d Value: %s\n", i, tk.type[i], tk.text[i]);
printf("TokenNum: %zu Type: %s Value: %s\n", i, tk.tktype[i], tk.text[i]);
}
// printf("token count: %zu\n", tk.size);
}