@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)
yield (node.opcodes, node, "opcodes", 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)))
+ yield (node.operands, node, "operands", mdis.walker.AttributePath)