diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-01-08 14:46:44 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-01-09 17:27:02 -0800 |
commit | 0eb4b5cc0ec494f4b8de6933d2eddf97b12a77f7 (patch) | |
tree | 03c1263e633ccd89ca3b0203214cc56e2ff6b193 /include | |
parent | e887cda986218ae84317b3ecb5ba81d9b9bb776f (diff) | |
download | qtlocation-mapboxgl-0eb4b5cc0ec494f4b8de6933d2eddf97b12a77f7.tar.gz |
[core] Omit inferred type annotations for 'coalesce' arguments
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/expression/parsing_context.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/mbgl/style/expression/parsing_context.hpp b/include/mbgl/style/expression/parsing_context.hpp index e5c3d3359d..f92a4c95ea 100644 --- a/include/mbgl/style/expression/parsing_context.hpp +++ b/include/mbgl/style/expression/parsing_context.hpp @@ -68,20 +68,27 @@ public: optional<type::Type> getExpected() const { return expected; } const std::vector<ParsingError>& getErrors() const { return *errors; } + enum TypeAnnotationOption { + includeTypeAnnotations, + omitTypeAnnotations + }; + /* Parse the given style-spec JSON value into an Expression object. Specifically, this function is responsible for determining the expression type (either Literal, or the one named in value[0]) and dispatching to the appropriate ParseXxxx::parse(const V&, ParsingContext) method. */ - ParseResult parse(const mbgl::style::conversion::Convertible& value); - + ParseResult parse(const mbgl::style::conversion::Convertible& value, + TypeAnnotationOption typeAnnotationOption = includeTypeAnnotations); + /* Parse a child expression. */ ParseResult parse(const mbgl::style::conversion::Convertible&, std::size_t, - optional<type::Type> = {}); + optional<type::Type> = {}, + TypeAnnotationOption typeAnnotationOption = includeTypeAnnotations); /* Parse a child expression. |