| LPG question: how to add a method to generated code [message #574213] |
Sat, 15 November 2008 05:36 |
Jonathan Messages: 8 Registered: July 2009 |
Junior Member |
|
|
Hi, not sure if this is the forum for LPG questions but
here goes:
I would like to add a getType metod to all the generated AST nod
objects. The method should return a constant representing
the AST node (this to avoid all the instanceof constructs).
What is the best way to do this?
BTW: Is it possible to define that all the AST node inherits from
a class that I declare?
Thanks in advance
Jonathan
|
|
|
Powered by
FUDForum. Page generated in 0.01495 seconds