From 54f3dc961e3a9e668312d7210706cddcf19676f7 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 1 Mar 2018 16:02:56 -0800 Subject: Relax type checking for "length" --- include/mbgl/style/expression/length.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/mbgl/style/expression/length.hpp (limited to 'include/mbgl/style/expression/length.hpp') diff --git a/include/mbgl/style/expression/length.hpp b/include/mbgl/style/expression/length.hpp new file mode 100644 index 0000000000..1d754f1932 --- /dev/null +++ b/include/mbgl/style/expression/length.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include + +#include +#include + +namespace mbgl { +namespace style { +namespace expression { + +class Length : public Expression { +public: + Length(std::unique_ptr input); + + static ParseResult parse(const mbgl::style::conversion::Convertible& value, ParsingContext& ctx); + + EvaluationResult evaluate(const EvaluationContext& params) const override; + void eachChild(const std::function& visit) const override; + bool operator==(const Expression& e) const override; + std::vector> possibleOutputs() const override; + std::string getOperator() const override { return "length"; } + +private: + std::unique_ptr input; +}; + +} // namespace expression +} // namespace style +} // namespace mbgl -- cgit v1.2.1