aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-06-17 23:46:47 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-06-17 23:46:47 +0300
commit1eae1ba1022059d58b7b04b0f6fa719b33b18803 (patch)
tree942a533cbced4c52297a1f6d52d0eba3b78d8848
parent16c418ef75ce8d35c2b3fbe19c4dd02d71e04859 (diff)
small text output change
-rw-r--r--src/lexer.c16
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