[core] Introduce "collator" expressions
Cross platform parsing and evaluation code.
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user