Repr v2 progress (#13268)

* progress on repr_v2

* repr progress

* add ref objects with distrinct

* fix failing tests
This commit is contained in:
cooldome 2020-01-28 19:05:57 +00:00 • committed by Andreas Rumpf
commit 76ede7c198
4 changed files with 97 additions and 78 deletions

View file

@ -1988,10 +1988,6 @@ template unlikely*(val: bool): bool =
import system/dollars
export dollars
when defined(nimV2):
import system/repr_v2
export repr_v2
const
NimMajor* {.intdefine.}: int = 1
## is the major number of Nim's version.
@ -2620,7 +2616,8 @@ type
## Represents a Nim AST node. Macros operate on this type.
when defined(nimV2):
proc repr*(x: NimNode): string {.magic: "Repr", noSideEffect.}
import system/repr_v2
export repr_v2
macro lenVarargs*(x: varargs[untyped]): int {.since: (1, 1).} =
## returns number of variadic arguments in `x`