projects
/
mdis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74ba846
)
visitor: support additional arguments
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 23 Jun 2023 08:28:21 +0000
(11:28 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 23 Jun 2023 08:28:21 +0000
(11:28 +0300)
src/mdis/visitor.py
patch
|
blob
|
history
diff --git
a/src/mdis/visitor.py
b/src/mdis/visitor.py
index ff2617297877fb0fbfab4683e7f95339b8f38c96..d7422681592dfba7d4ba34c40c97dd292e567748 100644
(file)
--- a/
src/mdis/visitor.py
+++ b/
src/mdis/visitor.py
@@
-15,12
+15,12
@@
class VisitorMeta(dispatcher.DispatcherMeta):
class Visitor(dispatcher.Dispatcher, metaclass=VisitorMeta):
@dispatcher.Hook(object)
- def dispatch_object(self, node):
+ def dispatch_object(self, node
, *arguments
):
return node
class ContextVisitor(Visitor):
@dispatcher.Hook(object)
@contextlib.contextmanager
- def dispatch_object(self, node):
- yield super().__call__(node)
+ def dispatch_object(self, node
, *arguments
):
+ yield super().__call__(node
, *arguments
)