frontend: compile: print number and atom token info
This commit is contained in:
@@ -87,6 +87,7 @@ static int compile_file(const char *path)
|
|||||||
case IVY_TOK_IDENT:
|
case IVY_TOK_IDENT:
|
||||||
case IVY_TOK_LABEL:
|
case IVY_TOK_LABEL:
|
||||||
case IVY_TOK_STRING:
|
case IVY_TOK_STRING:
|
||||||
|
case IVY_TOK_ATOM:
|
||||||
printf("(%s)", tok->t_str);
|
printf("(%s)", tok->t_str);
|
||||||
break;
|
break;
|
||||||
case IVY_TOK_SYMBOL:
|
case IVY_TOK_SYMBOL:
|
||||||
@@ -95,6 +96,9 @@ static int compile_file(const char *path)
|
|||||||
case IVY_TOK_KEYWORD:
|
case IVY_TOK_KEYWORD:
|
||||||
printf("(%s)", ivy_keyword_to_string(tok->t_keyword));
|
printf("(%s)", ivy_keyword_to_string(tok->t_keyword));
|
||||||
break;
|
break;
|
||||||
|
case IVY_TOK_NUMBER:
|
||||||
|
printf("(%llu)", tok->t_number);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user