mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-03 04:24:45 +00:00
(cherry picked from commit 49e793e8c4)
This commit is contained in:
@@ -448,7 +448,10 @@ proc mutateType(t: PType, iter: TTypeMutator, closure: RootRef): PType =
|
||||
|
||||
proc valueToString(a: PNode): string =
|
||||
case a.kind
|
||||
of nkCharLit..nkUInt64Lit: result = $a.intVal
|
||||
of nkCharLit, nkUIntLit..nkUInt64Lit:
|
||||
result = $cast[uint64](a.intVal)
|
||||
of nkIntLit..nkInt64Lit:
|
||||
result = $a.intVal
|
||||
of nkFloatLit..nkFloat128Lit: result = $a.floatVal
|
||||
of nkStrLit..nkTripleStrLit: result = a.strVal
|
||||
else: result = "<invalid value>"
|
||||
|
||||
Reference in New Issue
Block a user