fhdl/visit: add TransformModule

This commit is contained in:
Sebastien Bourdeauducq 2013-04-10 23:42:14 +02:00
parent 746acdacd1
commit 4c9018ea17

View file

@ -197,3 +197,11 @@ class NodeTransformer:
def visit_unknown(self, node):
return node
class TransformModule:
def __init__(self, transform, module):
self.transform = transform
self.module = module
def get_fragment(self):
return self.transform(self.module.get_fragment())