#ifndef LEXER_H
#define LEXER_H

enum token_type {
    IDENTIFIER,
    INT_LIT,
    CHAR_LIT,
    STR_LIT,
    HASHTAG,
    LPAREN,
    RPAREN,
    LCURLY,
    RCURLY,
    LSQUARE,
    RSQUARE,
    COLON,
    SEMI,
    COMMA,
    DOT,
    QMARK,
    NOT,
    NEQ,
    XOR,
    XEQ,
    AMP,
    LOG_AND,
    AND_EQ,
    STAR,
    MUL_EQ,
    NEG,
    NEG_EQ,
    ARROW,
    ASSIGN,
    TEST_EQ,
    PLUS,
    PLUS_EQ,
    BSLASH,
    PIPE,
    LOG_PIPE,
    PIPE_EQ,
    DIV,
    DIV_EQ, // comments too
    LT,
    GT,
    LEQ,
    GEQ,
    SHR,
    SHR_EQ,
    SHL,
    SHL_EQ
    /* more to come */
    // ->, everything that can precede = (multi-symbols)
};

typedef unsigned long long intlit_t;

struct token {
    enum token_type type;
    union {
        char* identifier;
        intlit_t int_lit;
        char char_lit;
        char* str_lit;
        void* unused;
    } data;
};

void lexer_load(const char* path);
bool lexer_peek(struct token* p_token);
bool lexer_pop(struct token* p_token);

#endif
