-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Canonicalize identifiers in error messages #16702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
error message
This issue points out an error message that is unhelpful and should be improved.
Milestone
Comments
Not sure where it would need to be applied, but it seems like changing the error printing code to something like the following would work. try writer.print("{}", .{std.zig.fmtEscapes(identifier_name)}); |
Another place this code be done is in the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
error message
This issue points out an error message that is unhelpful and should be improved.
Zig Version
0.12.0-dev.5+fc6e57568
Steps to Reproduce and Observed Output
Expected Output
I'd prefer if the error message represented the identifier the same way it looks in Zig source:
In other words, print identifiers the same way zig fmt would canonicalize them (#166). And if that requires @"...", then don't bother adding single quotes around it.
The text was updated successfully, but these errors were encountered: