Replies: 3 comments
-
If there's a line continuing after that, I think it should show it as well? |
Beta Was this translation helpful? Give feedback.
-
I'm running into a similar issue. I have a format for DFA transitions like this:
Note the syntax error where I left off a semicolon on line 2. I want to improve the default error message in this case. I ignore all whitespace (including newlines) between tokens. For reference, here's the
The error message is this (BTW, for the sake of anyone who had the same confusion I did, it took me forever to figure out that you have to call
It seems like it would be much more useful to print not only the line where the parser failed to find an expected token, but all of the lines in between the start token of the parent rule and the error. In this case, it was trying to parse the previous transition It seems like a better general-purpose error message would be to take all the lines between the start of parsing
On a related note, it's awkward that I have to create subrules such as |
Beta Was this translation helpful? Give feedback.
-
Per a discussion on Discord, I think a good feature to add would be this: make two variants of "silent" rules:
|
Beta Was this translation helpful? Give feedback.
-
Currently if pest fails on a blank line it will output something like this:
I would like it to output a configurable number of surrounding lines a la rustc error messages.
Is it possible to configure this somewhere?
Beta Was this translation helpful? Give feedback.
All reactions