Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » LPG question: how to add a method to generated code
LPG question: how to add a method to generated code [message #574213] Sat, 15 November 2008 05:36
Jonathan is currently offline 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
Previous Topic:incremental builder wizard failed
Next Topic:How to get LPG to treat comments as terminals
Goto Forum:
  


Current Time: Tue Jul 22 21:46:32 EDT 2014

Powered by FUDForum. Page generated in 0.02930 seconds