fhdl/structure: add unary minus
This commit is contained in:
parent
d8e478efee
commit
55d143a454
|
@ -37,6 +37,8 @@ class HUID:
|
||||||
class Value(HUID):
|
class Value(HUID):
|
||||||
def __invert__(self):
|
def __invert__(self):
|
||||||
return _Operator("~", [self])
|
return _Operator("~", [self])
|
||||||
|
def __neg__(self):
|
||||||
|
return _Operator("-", [self])
|
||||||
|
|
||||||
def __add__(self, other):
|
def __add__(self, other):
|
||||||
return _Operator("+", [self, other])
|
return _Operator("+", [self, other])
|
||||||
|
|
Loading…
Reference in New Issue