Ensure token's integer value is printed properly on macOS and Linux

This commit is contained in:
Abdelrahman Said 2023-06-26 07:31:19 +01:00
parent 3ded1d2708
commit 9963527db0

View File

@ -279,7 +279,7 @@ void print_token(token_t token) {
printf("%15s, VALUE: %s", "TK_STR_VAL", token.value.string);
break;
case TK_INTEGER:
printf("%15s, VALUE: %ld", "TK_INTEGER", token.value.num_int);
printf("%15s, VALUE: %lld", "TK_INTEGER", (long long)token.value.num_int);
break;
case TK_DOUBLE:
printf("%15s, VALUE: %f", "TK_DOUBLE", token.value.num_frac);