implemented case expressions
This commit is contained in:
parent
92f70b08f9
commit
770d4a997e
8 changed files with 137 additions and 24 deletions
|
|
@ -2116,7 +2116,7 @@ proc `/`*(x, y: int): float {.inline, noSideEffect.} =
|
|||
## integer division that results in a float.
|
||||
result = toFloat(x) / toFloat(y)
|
||||
|
||||
template `-|`(b, s: expr): expr =
|
||||
template `-|`*(b, s: expr): expr =
|
||||
(if b >= 0: b else: s.len + b)
|
||||
|
||||
proc `[]`*(s: string, x: TSlice[int]): string {.inline.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue