And/or/xor for enums
This commit is contained in:
parent
1251d9e200
commit
0ef310b7d9
1 changed files with 12 additions and 0 deletions
|
|
@ -58,4 +58,16 @@ template defineEnum*(typ) =
|
|||
proc `shr`*(x: int, y: typ): typ {.borrow.}
|
||||
proc `shr`*(x, y: typ): typ {.borrow.}
|
||||
|
||||
proc `or`*(x: typ, y: int): typ {.borrow.}
|
||||
proc `or`*(x: int, y: typ): typ {.borrow.}
|
||||
proc `or`*(x, y: typ): typ {.borrow.}
|
||||
|
||||
proc `and`*(x: typ, y: int): typ {.borrow.}
|
||||
proc `and`*(x: int, y: typ): typ {.borrow.}
|
||||
proc `and`*(x, y: typ): typ {.borrow.}
|
||||
|
||||
proc `xor`*(x: typ, y: int): typ {.borrow.}
|
||||
proc `xor`*(x: int, y: typ): typ {.borrow.}
|
||||
proc `xor`*(x, y: typ): typ {.borrow.}
|
||||
|
||||
proc `$` *(x: typ): string {.borrow.}
|
||||
Loading…
Add table
Add a link
Reference in a new issue