From 335e360b2dd9759fd8e435eabf617c97e5fdb500 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Tue, 19 Nov 2024 16:57:39 +0000 Subject: [PATCH] frontend: implement printing integer and double lex tokens --- frontend/debug.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/debug.c b/frontend/debug.c index 62bc86d..9aafa57 100644 --- a/frontend/debug.c +++ b/frontend/debug.c @@ -14,7 +14,8 @@ extern void print_lex_token(struct ivy_token *tok) case IVY_TOK_ATOM: b_fputs("[yellow]", stdout); break; - case IVY_TOK_NUMBER: + case IVY_TOK_INT: + case IVY_TOK_DOUBLE: b_fputs("[yellow]", stdout); break; case IVY_TOK_LABEL: @@ -54,8 +55,11 @@ extern void print_lex_token(struct ivy_token *tok) case IVY_TOK_KEYWORD: printf("(%s)", ivy_keyword_to_string(tok->t_keyword)); break; - case IVY_TOK_NUMBER: - printf("(%llu)", tok->t_number); + case IVY_TOK_INT: + printf("(%llu)", tok->t_int); + break; + case IVY_TOK_DOUBLE: + printf("(%lf)", tok->t_double); break; default: break;