about summary refs log tree commit diff
path: root/src/libexpr/value-to-xml.cc
diff options
context:
space:
mode:
authorChristian Theune <ct@flyingcircus.io>2016-01-04T23·40+0100
committerChristian Theune <ct@flyingcircus.io>2016-01-04T23·40+0100
commit14ebde52893263930cdcde1406cc91cc5c42556f (patch)
tree2b65c11405f9aef33eb284208716f9cb5b434599 /src/libexpr/value-to-xml.cc
parentb8258a4475726b56a4caa6553568c67a343a091d (diff)
First hit at providing support for floats in the language.
Diffstat (limited to 'src/libexpr/value-to-xml.cc')
-rw-r--r--src/libexpr/value-to-xml.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/value-to-xml.cc b/src/libexpr/value-to-xml.cc
index cb52ce1e67bd..00b1918a82aa 100644
--- a/src/libexpr/value-to-xml.cc
+++ b/src/libexpr/value-to-xml.cc
@@ -148,6 +148,10 @@ static void printValueAsXML(EvalState & state, bool strict, bool location,
             v.external->printValueAsXML(state, strict, location, doc, context, drvsSeen);
             break;
 
+        case tFloat:
+            doc.writeEmptyElement("float", singletonAttrs("value", (format("%1%") % v.fpoint).str()));
+            break;
+
         default:
             doc.writeEmptyElement("unevaluated");
     }