proc isNamedTuple(T: typedesc): bool {.magic: "TypeTrait".} ## imported from typetraits proc distinctBase(T: typedesc): typedesc {.magic: "TypeTrait".} ## imported from typetraits proc repr*(x: NimNode): string {.magic: "Repr", noSideEffect.} proc repr*(x: int): string {.magic: "IntToStr", noSideEffect.} ## repr for an integer argument. Returns `x` ## converted to a decimal string. proc repr*(x: int64): string {.magic: "Int64ToStr", noSideEffect.} ## repr for an integer argument. Returns `x` ## converted to a decimal string. proc repr*(x: uint64): string {.noSideEffect.} = ## repr for an unsigned integer argument. Returns `x` ## converted to a decimal string. $x #Calls `$` from system/strmantle.nim proc repr*(x: float): string {.magic: "FloatToStr", noSideEffect.} ## repr for a float argument. Returns `x` ## converted to a decimal string. proc repr*(x: bool): string {.magic: "BoolToStr", noSideEffect.} ## repr for a boolean argument. Returns `x` ## converted to the string "false" or "true". proc repr*(x: char): string {.noSideEffect.} = ## repr for a character argument. Returns `x` ## converted to an escaped string. ## ## .. code-block:: Nim ## assert repr('c') == "'c'" result.add '\'' # Elides string creations if not needed if x in {'\\', '\0'..'\31', '\127'..'\255'}: result.add '\\' if x in {'\0'..'\31', '\127'..'\255'}: result.add $x.uint8 else: result.add x result.add '\'' proc repr*(x: string | cstring): string {.noSideEffect.} = ## repr for a string argument. Returns `x` ## converted to a quoted and escaped string. result.add '\"' for i in 0..