summaryrefslogtreecommitdiff
path: root/scripts/generate-style-code.js
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-08-21 16:19:43 -0700
committerChris Loer <chris.loer@mapbox.com>2018-08-21 22:02:51 -0700
commitfd1767efba85dcfa5a3db27136306eca53519b8a (patch)
tree01be0a98566dfd07cf54fe0bcc53ebfa9675437c /scripts/generate-style-code.js
parent33cd094d853f9c74aeaa1466e9fe6986db448139 (diff)
downloadqtlocation-mapboxgl-fd1767efba85dcfa5a3db27136306eca53519b8a.tar.gz
[core, test] Bump GL JS pin to bring gl-native back in sync with gl-js.
Requires changing `generate-style-code` to treat 'formatted' as being the same as 'string' until gl-native gets 'formatted' support with https://github.com/mapbox/mapbox-gl-native/pull/12624. To make nitpick happy, PropertyFunction.java uses the latest "text-field" description from v8.json. It's technically correct, just kind of pointless since the "If a plain `string` is provided" clause will always be true.
Diffstat (limited to 'scripts/generate-style-code.js')
-rwxr-xr-xscripts/generate-style-code.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js
index 9a7b2842f7..236df0a921 100755
--- a/scripts/generate-style-code.js
+++ b/scripts/generate-style-code.js
@@ -37,6 +37,7 @@ global.evaluatedType = function (property) {
return 'bool';
case 'number':
return 'float';
+ case 'formatted':
case 'string':
return 'std::string';
case 'enum':
@@ -120,6 +121,7 @@ global.defaultValue = function (property) {
switch (property.type) {
case 'number':
return property.default;
+ case 'formatted':
case 'string':
return JSON.stringify(property.default || "");
case 'enum':