fixes JS regression
This commit is contained in:
parent
cc925d97f4
commit
db67e95bb2
1 changed files with 4 additions and 2 deletions
|
|
@ -3286,10 +3286,12 @@ proc `/=`*[T: float|float32](x: var T, y: T) {.inline, noSideEffect.} =
|
||||||
x = x / y
|
x = x / y
|
||||||
|
|
||||||
proc `&=`* (x: var string, y: string) {.magic: "AppendStrStr", noSideEffect.}
|
proc `&=`* (x: var string, y: string) {.magic: "AppendStrStr", noSideEffect.}
|
||||||
template `&=`*(x, y: typed) = add(x, y)
|
template `&=`*(x, y: typed) =
|
||||||
template `&=`*(f: File, x: typed) = write(f, x)
|
|
||||||
## generic 'sink' operator for Nim. For files an alias for ``write``.
|
## generic 'sink' operator for Nim. For files an alias for ``write``.
|
||||||
## If not specialized further an alias for ``add``.
|
## If not specialized further an alias for ``add``.
|
||||||
|
add(x, y)
|
||||||
|
when declared(File):
|
||||||
|
template `&=`*(f: File, x: typed) = write(f, x)
|
||||||
|
|
||||||
proc astToStr*[T](x: T): string {.magic: "AstToStr", noSideEffect.}
|
proc astToStr*[T](x: T): string {.magic: "AstToStr", noSideEffect.}
|
||||||
## converts the AST of `x` into a string representation. This is very useful
|
## converts the AST of `x` into a string representation. This is very useful
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue