fixes #3767
This commit is contained in:
parent
267a2756e4
commit
d3ce5f34f8
1 changed files with 8 additions and 2 deletions
|
|
@ -3541,16 +3541,22 @@ proc `^`*(x: int): int {.noSideEffect, magic: "Roof".} =
|
|||
## overloaded ``[]`` or ``[]=`` accessors.
|
||||
discard
|
||||
|
||||
template `..^`*(a, b: expr): expr =
|
||||
template `..^`*(a, b: untyped): untyped =
|
||||
## a shortcut for '.. ^' to avoid the common gotcha that a space between
|
||||
## '..' and '^' is required.
|
||||
a .. ^b
|
||||
|
||||
template `..<`*(a, b: expr): expr =
|
||||
template `..<`*(a, b: untyped): untyped {.dirty.} =
|
||||
## a shortcut for '.. <' to avoid the common gotcha that a space between
|
||||
## '..' and '<' is required.
|
||||
a .. <b
|
||||
|
||||
iterator `..<`*[S,T](a: S, b: T): T =
|
||||
var i = T(a)
|
||||
while i < b:
|
||||
yield i
|
||||
inc i
|
||||
|
||||
proc xlen*(x: string): int {.magic: "XLenStr", noSideEffect.} = discard
|
||||
proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.} =
|
||||
## returns the length of a sequence or a string without testing for 'nil'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue