1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

First hit at providing support for floats in the language.

This commit is contained in:
Christian Theune 2016-01-05 00:40:40 +01:00
parent b8258a4475
commit 14ebde5289
16 changed files with 207 additions and 23 deletions

View file

@ -84,6 +84,10 @@ void printValueAsJSON(EvalState & state, bool strict,
v.external->printValueAsJSON(state, strict, str, context);
break;
case tFloat:
str << v.fpoint;
break;
default:
throw TypeError(format("cannot convert %1% to JSON") % showType(v));
}