#ifndef TOKENIZER_H
#define TOKENIZER_H

#include <stdbool.h>
#include <stdint.h>

typedef enum Token {
    T_INT,
    T_FLOAT,
    T_NULL,
    T_TRUE,
    T_FALSE,
    T_ADD,
    T_SUB,
    T_MUL,
    T_DIV,
    T_MOD,
    T_LESS,
    T_LESS_EQUAL,
    T_GREATER,
    T_GREATER_EQUAL,
    T_EQUAL,
    T_NOT_EQUAL,
    T_NOT,
    T_AND,
    T_OR,
    T_BIT_AND,
    T_BIT_OR,
    T_SET,
    T_LITERAL,
    T_PRINT,
    T_IF,
    T_ELSE,
    T_FUNCTION,
    T_RETURN,
    T_COMMA,
    T_SEMICOLON,
    T_OPEN_BRACKET,
    T_CLOSE_BRACKET,
    T_OPEN_CURVED_BRACKET,
    T_CLOSE_CURVED_BRACKET,
    T_END
} Token;

typedef int16_t int16;

bool tTokenize(const char* path);
const char* tGetError();

void tResetReader();
Token tPeekToken();
Token tReadToken();
bool tReadInt(int* i);
bool tReadInt16(int16* i);
bool tReadFloat(float* f);
const char* tReadString();

int tGetMarker();
void tResetToMarker(int marker);

const char* tGetTokenName(Token token);

void tPrint();

#endif