frontend: implement printing integer and double lex tokens

This commit is contained in:
2024-11-19 16:57:39 +00:00
parent 6e642b3c19
commit 335e360b2d

View File

@@ -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;