diff options
Diffstat (limited to 'include/mbgl')
-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. |