diff options
author | Christian Theune <ct@flyingcircus.io> | 2016-01-05 00:40:40 +0100 |
---|---|---|
committer | Christian Theune <ct@flyingcircus.io> | 2016-01-05 00:40:40 +0100 |
commit | 14ebde52893263930cdcde1406cc91cc5c42556f (patch) | |
tree | 2b65c11405f9aef33eb284208716f9cb5b434599 /src/libexpr/value-to-json.cc | |
parent | b8258a4475726b56a4caa6553568c67a343a091d (diff) |
First hit at providing support for floats in the language.
Diffstat (limited to 'src/libexpr/value-to-json.cc')
-rw-r--r-- | src/libexpr/value-to-json.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/value-to-json.cc b/src/libexpr/value-to-json.cc index b0cf85e21..47ee324a6 100644 --- a/src/libexpr/value-to-json.cc +++ b/src/libexpr/value-to-json.cc @@ -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)); } |