fhdl: allow None statements
This commit is contained in:
parent
85491efc68
commit
aa8b8da684
|
@ -26,7 +26,9 @@ class Namespace:
|
|||
return sig.name
|
||||
|
||||
def list_signals(node):
|
||||
if isinstance(node, Constant):
|
||||
if node is None:
|
||||
return set()
|
||||
elif isinstance(node, Constant):
|
||||
return set()
|
||||
elif isinstance(node, Signal):
|
||||
return {node}
|
||||
|
@ -56,7 +58,9 @@ def list_signals(node):
|
|||
raise TypeError
|
||||
|
||||
def list_targets(node):
|
||||
if isinstance(node, Signal):
|
||||
if node is None:
|
||||
return set()
|
||||
elif isinstance(node, Signal):
|
||||
return {node}
|
||||
elif isinstance(node, _Slice):
|
||||
return list_targets(node.value)
|
||||
|
|
|
@ -49,7 +49,9 @@ def _printexpr(ns, node):
|
|||
(_AT_BLOCKING, _AT_NONBLOCKING, _AT_SIGNAL) = range(3)
|
||||
|
||||
def _printnode(ns, at, level, node):
|
||||
if isinstance(node, _Assign):
|
||||
if node is None:
|
||||
return ""
|
||||
elif isinstance(node, _Assign):
|
||||
if at == _AT_BLOCKING:
|
||||
assignment = " = "
|
||||
elif at == _AT_NONBLOCKING:
|
||||
|
|
Loading…
Reference in New Issue