#pragma once #include "ModifierGrammar.hpp" #include "SimpleGrammar.hpp" #include "TriggerGrammar.hpp" #include #include namespace ovdl::v2script::grammar { struct AiBehaviorList { static constexpr auto rule = lexy::dsl::list(lexy::dsl::p | lexy::dsl::p); static constexpr auto value = lexy::as_list> >> lexy::callback( [](auto&& list) { return ast::make_node_ptr(LEXY_MOV(list)); }); }; struct AiBehaviorBlock { static constexpr auto rule = lexy::dsl::curly_bracketed.opt(lexy::dsl::p); static constexpr auto value = lexy::callback( [](auto&& list) { return LEXY_MOV(list); }, [](lexy::nullopt = {}) { return lexy::nullopt {}; }); }; }