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
>
>
>