diff options
-rw-r--r-- | src/lexer.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lexer.c b/src/lexer.c index 6d13700..d24b972 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -44,13 +44,15 @@ static int try_symbol(lexer_t lexer); X(try_symbol) // X(token type, what to free, how to print on screen) -#define TOKEN_TYPES_INFO(X, token) \ - X(TOKEN_PARENTHS_OPEN, NULL, "'('") \ - X(TOKEN_PARENTHS_CLOSE, NULL, "')'") \ - X(TOKEN_LITERAL_STRING, token->string, "%s", token->string) \ - X(TOKEN_LITERAL_NUM_INT, NULL, "%ld", token->num_int) \ - X(TOKEN_LITERAL_NUM_FLOAT, NULL, "%f", token->num_float) \ - X(TOKEN_SYMBOL, token->symbol, "%s", token->symbol) \ +#define TOKEN_TYPES_INFO(X, token) \ + X(TOKEN_PARENTHS_OPEN, NULL, "(") \ + X(TOKEN_PARENTHS_CLOSE, NULL, ")") \ + X(TOKEN_SPECIAL_QUOTE, NULL, "'") \ + X(TOKEN_SPECIAL_DOT, NULL, ".") \ + X(TOKEN_LITERAL_STRING, token->string, "'%s'", token->string) \ + X(TOKEN_LITERAL_NUM_INT, NULL, "'%ld'", token->num_int) \ + X(TOKEN_LITERAL_NUM_FLOAT, NULL, "'%f'", token->num_float) \ + X(TOKEN_SYMBOL, token->symbol, "'%s'", token->symbol) #define EQ(ch) ch == #define FN(f) f |