Ensure token's line and column number are printed properly on macOS and

Linux
This commit is contained in:
Abdelrahman Said 2023-06-26 07:32:42 +01:00
parent 9963527db0
commit 55ca87c425

View File

@ -246,7 +246,8 @@ bool validate_json(char *json) {
}
void print_token(token_t token) {
printf("{LINE: %4lu, COLUMN: %4lu, TYPE: ", token.line, token.column);
printf("{LINE: %4llu, COLUMN: %4llu, TYPE: ", (unsigned long long)token.line,
(unsigned long long)token.column);
switch (token.type) {
case TK_NO_TOKEN: