12345678910111213141516171819202122232425262728293031323334 |
- #ifndef TOKENIZER_H
- #define TOKENIZER_H
- #include <stdbool.h>
- typedef enum Token {
- T_INT,
- T_FLOAT,
- T_NULL,
- T_TRUE,
- T_FALSE,
- T_ADD,
- T_MUL,
- T_PRINT,
- T_SEMICOLON,
- T_OPEN_BRACKET,
- T_CLOSE_BRACKET,
- T_END
- } Token;
- bool tTokenize(const char* path);
- const char* tGetError();
- void tResetReader();
- Token tPeekToken();
- Token tReadToken();
- bool tReadInt(int* i);
- bool tReadFloat(float* i);
- const char* tGetTokenName(Token token);
- void tPrint();
- #endif
|