[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LPeg-based forgiving Lua parser
- From: Paul K <paul@...>
- Date: Sat, 14 Jun 2014 05:17:23 +0000
Hi Patrick,
> Speaking with the experience of making this [1], I imagine supporting
> syntax errors would involve something like:
> ...
> [1] 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.
Paul.