[core] Introduce "collator" expressions

Cross platform parsing and evaluation code.
This commit is contained in:
Chris Loer
2018-06-29 15:56:37 -07:00
committed by Chris Loer
parent b9d3ecc990
commit 9ff5d34ef2
15 changed files with 297 additions and 16 deletions

View File

@@ -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),