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 10:36
Jonathan is currently offline JonathanFriend
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: Fri Nov 28 13:51:11 GMT 2014

Powered by FUDForum. Page generated in 0.02481 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software