#ifndef LEXER #define LEXER typedef enum TokenType { ERR, EOL, NAME, KEYWORD, STRING_LIT, INT_LIT, SEMICOLON, OPEN_PAREN, CLOSE_PAREN, OPEN_BRACE, CLOSE_BRACE, OPEN_BRACKET, CLOSE_BRACKET, START_COMMENT, EQUALS, DOUBLE_EQUALS, NEGATION, ASTERISK, PLUS_SIGN, FUNCTION } tokenType_t; typedef enum Keyword { K_NONE, K_VOID, K_INT, K_FLOAT, K_STRING } keyword_t; typedef struct Token { tokenType_t type; void* value; } token_t; token_t init_token(tokenType_t type, void* value); typedef struct TokenSet { token_t* tokens; int count; } tokenSet_t; tokenSet_t init_tokenset(token_t* tokens, int count); char* tttos(tokenType_t tokenType); int advance_whitespace(char** linePointer); keyword_t try_get_keyword(char* name); char keyword_is_type(keyword_t keyword); token_t lex_first_token(char** content); token_t lex_first_string(char** content); token_t lex_first_int(char** content); #endif