[metaas-dev] walker and visitor for asmethods
David Holroyd
dave at badgers-in-foil.co.uk
Wed Jan 23 08:57:34 UTC 2008
On Tue, Jan 22, 2008 at 10:45:30PM +0100, R?mi Flament wrote:
> Hi,
>
> I wrote a small set of classes to simplify the walking of a ASMethod code.
> I followed the ASVisitor and ASWalker examples.
>
> I use it myself to find the list of variables that each method uses.
>
> Hope it helps,
It is!
This is exactly the kind of think I want to include in the public API.
I want a combined visitor/walker thing that covers the complete DOM, so
I will extend these classes a bit.
The use case I want to support is really simple expression
simplification. e.g. 'if (a() || true)' => 'if (a())'.
It would be helpful to know what the concrete visitor implementation
you use looks like, so that I can support other common scenarios better
too.
Thanks for the great contribution!
ta,
dave
--
http://david.holroyd.me.uk/
More information about the metaas-dev
mailing list