[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LPeg-based forgiving Lua parser
- From: Paul K <paul@...>
- Date: Sat, 14 Jun 2014 05:17:23 +0000
> Speaking with the experience of making this , I imagine supporting
> syntax errors would involve something like:
>  https://github.com/batrick/lunadry/blob/master/lunadry.lua
Thank you for the pointer and the suggestion. This is a very clever
approach to formatting that I haven't seen before.
> You could add captures to mark nodes as unknown. Finally, supporting
> incomplete nodes like while would involve a similar alternative for
> the end keyword.
I've been thinking about making "end" optional and then use its
capture to remove "incomplete" mark from the node. Not sure if there
is a better way to handle this.