hdl.ast: implement Value.__pos__.
This commit is contained in:
parent
342fd5f8bd
commit
bef2052c1e
2 changed files with 6 additions and 0 deletions
|
|
@ -166,6 +166,9 @@ class Value(metaclass=ABCMeta):
|
|||
def __bool__(self):
|
||||
raise TypeError("Attempted to convert Amaranth value to Python boolean")
|
||||
|
||||
def __pos__(self):
|
||||
return self
|
||||
|
||||
def __invert__(self):
|
||||
return Operator("~", [self])
|
||||
def __neg__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue