Thanks guys. Can we pretend this didn't happen? On another note it looks like the rule blocks are being class eval'd, so my `origin` instance method isn't even in scope. I'm passing it in when I call #apply, but is there a better way?
On Mon, Apr 1, 2013 at 6:57 AM, Nigel Thorne <[email protected]> wrote: > > def initialize(origin,&block) > @origin = origin > super(&block) # <-----change your AST.rb to this > end > > transform.rb in Parslet was complaining that > > def rules > self.class.rules + @rules > end > > was adding nil. just to be sure I changed it to this... > > def rules > puts "#{self.class.rules.inspect} + #{@rules.inspect}" > self.class.rules + @rules > end > > which shows that @rules was nil > > @rules is initialized to [] in the initialize method... so the constructor > wasn't being called.. > > so... > > call super ;) > > > > --- > "No man is an island... except Philip" > > > On Mon, Apr 1, 2013 at 9:24 PM, Kaspar Schiess <[email protected]> wrote: > >> Hi Thomas, >> >> I think you're missing a call to 'super()' in your transform. Can you >> check in the code next time, so that I can test exactly what you're >> testing? >> >> regards, >> kaspar >> >> >> > -- Thomas Ingram
