Files
hlang/parser3.c

13 lines
323 B
C
Raw Normal View History

2025-11-05 14:28:45 +03:00
#include "./lexer.h"
int main(void){
2025-11-05 15:27:57 +03:00
const char ts[] = "\"hello\" hi + 2";
const char math[] = "((1+2)*6)/18"; // = 1
Token tk = tokenize_all(math);
2025-11-05 14:28:45 +03:00
for (size_t i=0; i<tk.size; ++i){
2025-11-05 15:27:57 +03:00
printf("TokenNum: %zu Type: %s Value: %s\n", i, tk.tktype[i], tk.text[i]);
2025-11-05 14:28:45 +03:00
}
// printf("token count: %zu\n", tk.size);
}