#pragma once #include #include #include "Parsing/Menu/MenuFileParser.h" #include "Parsing/Menu/Domain/Expression/ICommonExpression.h" namespace menu { class GenericExpressionPropertySequence final : public MenuFileParser::sequence_t { public: using callback_t = std::function value)>; private: static constexpr auto CAPTURE_VALUE = 1; const callback_t m_set_callback; protected: void ProcessMatch(MenuFileParserState* state, SequenceResult& result) const override; private: explicit GenericExpressionPropertySequence(callback_t setCallback); public: static std::unique_ptr WithKeyword(std::string keyword, callback_t setCallback); static std::unique_ptr WithKeywords(std::initializer_list keywords, callback_t setCallback); static std::unique_ptr WithKeywordAndBool(std::string keyword, callback_t setCallback); }; }