using tools.nsc.asc.Trees ... how can i create the AST (ClassDef) for a case class including all the sugar? is there something like mkCaseClass out there?
using tools.nsc.asc.Trees ... how can i create the AST (ClassDef) for a case class including all the sugar? is there something like mkCaseClass out there?
Have a look at SyntheticMethods.scala, specifically its addSyntheticMethods method. That one contains the logic for adding operations to case classes.
On Tue, Dec 7, 2010 at 5:53 PM, Sciss <contact@sciss.de> wrote:
Have a look at SyntheticMethods.scala, specifically its addSyntheticMethods method. That one contains the logic for adding operations to case classes.
Cheers
-- Martin