frontend: implement printing integer and double lex tokens
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user