Fixed blinking functions.

Heh.
This commit is contained in:
Jacob Signorovitch 2024-10-19 09:15:03 -04:00
parent 933418895e
commit 4df9808859
3 changed files with 8 additions and 9 deletions

View File

@ -2,8 +2,6 @@
#define TOKEN_H
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#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

View File

@ -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__);

View File

@ -1,6 +1,7 @@
#include "include/token.h"
#include "include/dstr.h"
#include <stdlib.h>
#include <stdio.h>
Token* token_init(TokenType type, char* val, size_t valn) {
Token* t = malloc(sizeof(Token));