Fixed blinking functions.
Heh.
This commit is contained in:
parent
933418895e
commit
4df9808859
@ -2,8 +2,6 @@
|
|||||||
#define TOKEN_H
|
#define TOKEN_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include "dstr.h"
|
#include "dstr.h"
|
||||||
|
|
||||||
@ -23,10 +21,10 @@ typedef struct {
|
|||||||
Token* token_init(TokenType type, char* val, size_t valn);
|
Token* token_init(TokenType type, char* val, size_t valn);
|
||||||
void token_destroy(Token* token);
|
void token_destroy(Token* token);
|
||||||
|
|
||||||
// Returns a string representation of the Token.
|
// Prints out a representation of the Token.
|
||||||
Dstr* token_to_dstr(Token* token);
|
void token_print(Token* token);
|
||||||
|
|
||||||
// Returns a string representation of the TokenType.
|
// Prints out a representation of the TokenType.
|
||||||
char* token_type_to_str(TokenType t);
|
void tokentype_print(TokenType t);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
// Log a message.
|
// Log a message.
|
||||||
#define log_dbg(msg) \
|
#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", \
|
"\033[0m\n", \
|
||||||
__func__);
|
__func__);
|
||||||
|
|
||||||
// Log a message with formatting.
|
// Log a message with formatting.
|
||||||
#define log_dbgf(msg, ...) \
|
#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", \
|
"\033[0m\n", \
|
||||||
__func__, __VA_ARGS__);
|
__func__, __VA_ARGS__);
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "include/token.h"
|
#include "include/token.h"
|
||||||
#include "include/dstr.h"
|
#include "include/dstr.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
Token* token_init(TokenType type, char* val, size_t valn) {
|
Token* token_init(TokenType type, char* val, size_t valn) {
|
||||||
Token* t = malloc(sizeof(Token));
|
Token* t = malloc(sizeof(Token));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user