@mdis.dispatcher.Hook(Database)
def dispatch_database(self, node):
yield from self(tuple(node))
+
+ @mdis.dispatcher.Hook(Record)
+ def dispatch_record(self, node):
+ self.__record = node
+ for field in _dataclasses.fields(node):
+ key = field.name
+ value = getattr(node, key)
+ yield (value, node, key, mdis.walker.AttributePath)
+
+ @mdis.dispatcher.Hook(Operands)
+ def dispatch_operands(self, node):
+ def hook(cls_kwargs):
+ (cls, kwargs) = cls_kwargs
+ return cls(record=self.__record, **kwargs)
+
+ yield from self(tuple(map(hook, node)))