hdl.xfrm: Add on_AnyConst and on_AnySeq abstract methods for ValueVisitor and children.

This commit is contained in:
William D. Jones 2019-01-15 16:05:25 -05:00 committed by whitequark
parent 6fdbc3d885
commit 77728c2dea
2 changed files with 30 additions and 0 deletions

View file

@ -87,6 +87,12 @@ class _RHSValueCompiler(_ValueCompiler):
def on_Const(self, value):
return lambda state: value.value
def on_AnyConst(self, value):
raise NotImplementedError # :nocov:
def on_AnySeq(self, value):
raise NotImplementedError # :nocov:
def on_Signal(self, value):
if self.sensitivity is not None:
self.sensitivity.add(value)
@ -219,6 +225,12 @@ class _LHSValueCompiler(_ValueCompiler):
def on_Const(self, value):
raise TypeError # :nocov:
def on_AnyConst(self, value):
raise TypeError # :nocov:
def on_AnySeq(self, value):
raise TypeError # :nocov:
def on_Signal(self, value):
shape = value.shape()
value_slot = self.signal_slots[value]