Skip to content

Conversation

@DDAN-17
Copy link

@DDAN-17 DDAN-17 commented Aug 11, 2024

Changed %d specifier to %c so it outputs a character instead of an ASCII value.

Changed %d specifier to %c so it outputs a character instead of an ASCII value.
@DDAN-17 DDAN-17 changed the title Update parser.c Fix ASCII value output Aug 11, 2024
@Yongjie2017
Copy link
Collaborator

The variable "i" is an integer that holds not only a character, but possibly enum TOKEN_XXX that's beyond a char. Print with "%d" won't lose any info and is appropriate.
Suggest to close without a merge.

@hpax hpax closed this in 5b9099c Oct 6, 2025
@hpax
Copy link
Member

hpax commented Oct 6, 2025

The right thing here is to print the actual token, not the token type. Fix checked in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants