Remove dead magics (#13551)

This commit is contained in:
Arne Döring 2020-03-03 12:42:43 +01:00 • committed by GitHub
commit eb42f38088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 44 additions and 140 deletions

View file

@ -1458,7 +1458,7 @@ proc boolVal*(n: NimNode): bool {.compileTime, noSideEffect.} =
else: n == bindSym"true" # hacky solution for now
when defined(nimMacrosGetNodeId):
proc nodeID*(n: NimNode): int {.magic: NodeId.}
proc nodeID*(n: NimNode): int {.magic: "NodeId".}
## Returns the id of ``n``, when the compiler has been compiled
## with the flag ``-d:useNodeids``, otherwise returns ``-1``. This
## proc is for the purpose to debug the compiler only.

View file

@ -1,18 +1,18 @@
type
int* {.magic: Int.} ## Default integer type; bitwidth depends on
int* {.magic: "Int".} ## Default integer type; bitwidth depends on
## architecture, but is always the same as a pointer.
int8* {.magic: Int8.} ## Signed 8 bit integer type.
int16* {.magic: Int16.} ## Signed 16 bit integer type.
int32* {.magic: Int32.} ## Signed 32 bit integer type.
int64* {.magic: Int64.} ## Signed 64 bit integer type.
uint* {.magic: UInt.} ## Unsigned default integer type.
uint8* {.magic: UInt8.} ## Unsigned 8 bit integer type.
uint16* {.magic: UInt16.} ## Unsigned 16 bit integer type.
uint32* {.magic: UInt32.} ## Unsigned 32 bit integer type.
uint64* {.magic: UInt64.} ## Unsigned 64 bit integer type.
int8* {.magic: "Int8".} ## Signed 8 bit integer type.
int16* {.magic: "Int16".} ## Signed 16 bit integer type.
int32* {.magic: "Int32".} ## Signed 32 bit integer type.
int64* {.magic: "Int64".} ## Signed 64 bit integer type.
uint* {.magic: "UInt".} ## Unsigned default integer type.
uint8* {.magic: "UInt8".} ## Unsigned 8 bit integer type.
uint16* {.magic: "UInt16".} ## Unsigned 16 bit integer type.
uint32* {.magic: "UInt32".} ## Unsigned 32 bit integer type.
uint64* {.magic: "UInt64".} ## Unsigned 64 bit integer type.
type # we need to start a new type section here, so that ``0`` can have a type
bool* {.magic: Bool.} = enum ## Built-in boolean type.
bool* {.magic: "Bool".} = enum ## Built-in boolean type.
false = 0, true = 1
const