Closed botzill closed 6 years ago
First, thanks for this example, I didn’t find such example to use the visitor nodes.
I made it work just by de-commenting your generic visit. By default, the generic_visit
raises the exception NotImplementedError
(see nodes.py).
If I understand correctly, only the rules have a name (this line), and your node "My name is " is anonyous and hence cannot have a visit function. The generic_visit
is almost mandatory, as soon as there are anonymous nodes.
This issue is similar to #110.
I think you've pegged it, @Seb35. Thanks!
I have a simple example like this:
While I implement all
visit_
methods I still get the error:Any ideas why I'm doing wrong?