[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sat Jun 10 15:27:04 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1094
--- Comment #99 from Dmitry Selyutin <ghostmansd at gmail.com> ---
I'll come up with the patch to inline methods later. Note that the methods will
need to have different names; the following won't work:
class StubVisitor(Visitor):
@visitormethod(str)
def __call__(self, node):
print("string", node)
yield node
@visitormethod
def __call__(self, node):
print("integer", 42)
yield node
...but the following will:
class StubVisitor(Visitor):
@visitormethod(str)
def coco(self, node):
print("string", node)
yield node
@visitormethod
def jamboo(self, node):
print("integer", 42)
yield node
The names can be whatever you like, they just need to be distinct.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list