This commit is contained in:
Araq 2019-08-20 15:47:04 +02:00
commit b1b0960c36
2 changed files with 7 additions and 1 deletions

View file

@ -1660,6 +1660,8 @@ proc getInt64*(a: PNode): int64 {.deprecated: "use getInt".} =
proc getFloat*(a: PNode): BiggestFloat =
case a.kind
of nkFloatLiterals: result = a.floatVal
of nkCharLit, nkUIntLit..nkUInt64Lit, nkIntLit..nkInt64Lit:
result = BiggestFloat a.intVal
else:
raiseRecoverableError("cannot extract number from invalid AST node")
#doAssert false, "getFloat"