Document integer literal parsing#5462
Conversation
|
To be honest, besides the documentation addition, I'd also prefer to add a warning when using a literal that is out of bounds. This behavior seems too unpredictable to me, as is. (Or, should I say, rather surprising.) |
|
It looks like it happens here. Can you give a hint about how to implement such a warning? Or alternatively, I can make it produce an error guiding the user to use a |
|
We don't yet have any real infrastructure for adding warnings to the parser (I ran into this as well in #5229). We do have error infrastructure, so we could also just start by erroring on out-of-bounds literals. If we do want warnings, then there are many ways we could do so. One way to add parser warnings may be to add a However, I would recommend that we discuss if this is the right design before starting to implement it. Best would be to join the contributors channel on Discord, but we could also continue here (maybe in a new issue). And if you want any help talking through the parser infrastructure, let me know! |
|
Thanks! Since implementing a warning is a little more complex, let's not block this on it. |
Closes #2284