diff options
Diffstat (limited to 'include/mbgl/style/conversion/expression.hpp')
-rw-r--r-- | include/mbgl/style/conversion/expression.hpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/include/mbgl/style/conversion/expression.hpp b/include/mbgl/style/conversion/expression.hpp deleted file mode 100644 index c5fcf906a7..0000000000 --- a/include/mbgl/style/conversion/expression.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include <mbgl/style/expression/parsing_context.hpp> -#include <mbgl/style/expression/type.hpp> -#include <mbgl/style/conversion.hpp> - -#include <memory> - -namespace mbgl { -namespace style { -namespace conversion { - -using namespace mbgl::style::expression; - -template<> struct Converter<std::unique_ptr<Expression>> { - optional<std::unique_ptr<Expression>> operator()(const Convertible& value, Error& error, type::Type expected) const { - ParsingContext ctx(optional<type::Type> {expected}); - ParseResult parsed = ctx.parse(value); - if (parsed) { - return std::move(*parsed); - } - std::string combinedError; - for (const ParsingError& parsingError : ctx.getErrors()) { - if (combinedError.size() > 0) { - combinedError += "\n"; - } - if (parsingError.key.size() > 0) { - combinedError += parsingError.key + ": "; - } - combinedError += parsingError.message; - } - error = { combinedError }; - return {}; - }; -}; - -} // namespace conversion -} // namespace style -} // namespace mbgl |