diff --git a/src/include/token.h b/src/include/token.h index 52c26c0..527213e 100644 --- a/src/include/token.h +++ b/src/include/token.h @@ -2,8 +2,6 @@ #define TOKEN_H #include -#include -#include #include "dstr.h" @@ -23,10 +21,10 @@ typedef struct { Token* token_init(TokenType type, char* val, size_t valn); void token_destroy(Token* token); -// Returns a string representation of the Token. -Dstr* token_to_dstr(Token* token); +// Prints out a representation of the Token. +void token_print(Token* token); -// Returns a string representation of the TokenType. -char* token_type_to_str(TokenType t); +// Prints out a representation of the TokenType. +void tokentype_print(TokenType t); #endif diff --git a/src/include/util.h b/src/include/util.h index b6bb647..69a9f7b 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -5,13 +5,13 @@ // Log a message. #define log_dbg(msg) \ - printf("\033[37;1mdbg\033[0m:\033[37;5m%s\033[0m:\033[32m " msg \ + printf("\033[37;1mdbg\033[0m:\033[37m%s\033[0m:\033[32m " msg \ "\033[0m\n", \ __func__); // Log a message with formatting. #define log_dbgf(msg, ...) \ - printf("\033[37;1mdbg\033[0m:\033[37;5m%s\033[0m:\033[32m " msg \ + printf("\033[37;1mdbg\033[0m:\033[37m%s\033[0m:\033[32m " msg \ "\033[0m\n", \ __func__, __VA_ARGS__); diff --git a/src/token.c b/src/token.c index b5aab09..42f150f 100644 --- a/src/token.c +++ b/src/token.c @@ -1,6 +1,7 @@ #include "include/token.h" #include "include/dstr.h" -#include + +#include Token* token_init(TokenType type, char* val, size_t valn) { Token* t = malloc(sizeof(Token));