#pragma once #include #include #include namespace mbgl { namespace style { namespace expression { class At : public Expression { public: At(std::unique_ptr index_, std::unique_ptr input_) : Expression(input_->getType().get().itemType), index(std::move(index_)), input(std::move(input_)) {} static ParseResult parse(const mbgl::style::conversion::Convertible& value, ParsingContext& ctx); EvaluationResult evaluate(const EvaluationContext& params) const override; void eachChild(const std::function&) const override; bool operator==(const Expression& e) const override { if (auto rhs = dynamic_cast(&e)) { return *index == *(rhs->index) && *input == *(rhs->input); } return false; } std::vector> possibleOutputs() const override { return { nullopt }; } std::string getOperator() const override { return "at"; } private: std::unique_ptr index; std::unique_ptr input; }; } // namespace expression } // namespace style } // namespace mbgl