intellij-arend icon indicating copy to clipboard operation
intellij-arend copied to clipboard

Show less errors for code with syntax errors

Open marat-rkh opened this issue 3 years ago • 0 comments

Suppose I am defining a function:

Screen Shot 2021-08-15 at 1 03 04 PM

My caret is before the closing curly bracket. I know my code is incorrect, I need to write a type to fix it.

Expected: IDE shows me one error that says exactly that.

Actual: IDE spits way too many errors on me. The last 2 errors are incorrect, most of the rest are cryptic and confusing (<return expr wob> expected?):

Screen Shot 2021-08-15 at 1 03 24 PM Screen Shot 2021-08-15 at 1 03 35 PM Screen Shot 2021-08-15 at 1 03 48 PM

I think it makes sense to reduce the amount of errors. One way to do that is to improve the recovery rules in the parser definition.

marat-rkh avatar Aug 15 '21 10:08 marat-rkh