[Metalua-list] Re: metalua source parsing

Vyacheslav Egorov mister.aleph at gmail.com
Sun Sep 14 00:08:42 GMT+2 2008


On Sun, Sep 14, 2008 at 2:25 AM, Fabien Fleutot <fleutot at gmail.com> wrote:

> I think there's a more reasonnable way to perform code manipulation through
> metalua without messing users' code formatting nor AST definition: perform
> your manipulations on AST, of course, but then, splice the manipulated parts
> into the original source file, rather than entirely regenerating it.
>

I once developed a prototype of a splicer based on "reversed parser"
approach (unfortunately not for metalua).
The idea was to give modified AST back to parser which will match it with
what it sees in the file and thus will be able to determine exact places to
patch.

--
e.v.e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.luaforge.net/pipermail/metalua-list/attachments/20080914/63019b60/attachment.html


More information about the Metalua-list mailing list