From 1eae1ba1022059d58b7b04b0f6fa719b33b18803 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sat, 17 Jun 2023 23:46:47 +0300 Subject: small text output change --- src/lexer.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') 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 -- cgit v1.2.3