summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-06-29 15:56:37 -0700
committerChris Loer <chris.loer@mapbox.com>2018-07-03 10:03:05 -0700
commit9ff5d34ef2ed2a236cc495f0ad84919cedce9abc (patch)
treea8c0fca2f710bce564b2ef9c8f7f68291b9926ff /platform
parentb9d3ecc990ccac102bcfde0e848a4f31b739ad54 (diff)
downloadqtlocation-mapboxgl-9ff5d34ef2ed2a236cc495f0ad84919cedce9abc.tar.gz
[core] Introduce "collator" expressions
Cross platform parsing and evaluation code.
Diffstat (limited to 'platform')
-rw-r--r--platform/node/src/node_expression.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/node/src/node_expression.cpp b/platform/node/src/node_expression.cpp
index 9faa41d8b8..c0b512a899 100644
--- a/platform/node/src/node_expression.cpp
+++ b/platform/node/src/node_expression.cpp
@@ -144,6 +144,14 @@ struct ToValue {
return scope.Escape(result);
}
+ v8::Local<v8::Value> operator()(const Collator&) {
+ // Collators are excluded from constant folding and there's no Literal parser
+ // for them so there shouldn't be any way to serialize this value.
+ assert(false);
+ Nan::EscapableHandleScope scope;
+ return scope.Escape(Nan::Null());
+ }
+
v8::Local<v8::Value> operator()(const mbgl::Color& color) {
return operator()(std::vector<Value> {
static_cast<double>(color.r),