SquidDev / illuaminate

Very WIP static analysis for Lua
https://squiddev.cc/illuaminate/
BSD 3-Clause "New" or "Revised" License
49 stars 2 forks source link

Improved parse errors #19

Closed SquidDev closed 1 year ago

SquidDev commented 4 years ago

Menhir offers a fantastic system for reporting errors and we make pretty good use of it. However, there's some cases where we could provide better error messages. For instances:

We might also be able to implement error recovery, but I think that'd be a little harder.

I think the "best" way to do this is as follows:

It'd hardly elegant, and involves some wonderfully silly meta-programming, but it should work.

SquidDev commented 3 years ago

Just linking some of the comments in this post. Some potentially useful things we could try.

SquidDev commented 2 years ago

The alternative strategy here is to use TreeSitter, though this comes with the obvious problem of having to link native code (and breaking our JS integration).

SquidDev commented 1 year ago

I think this was mostly addressed by cd06555892d353f8dd6672c484d6455dac4c8ee5. There's always room for improvement here, but I think that's less well scoped.