diff options
Diffstat (limited to 'src/openvic-dataloader/v2script/ModifierGrammar.hpp')
-rw-r--r-- | src/openvic-dataloader/v2script/ModifierGrammar.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openvic-dataloader/v2script/ModifierGrammar.hpp b/src/openvic-dataloader/v2script/ModifierGrammar.hpp index 2b28712..74deef7 100644 --- a/src/openvic-dataloader/v2script/ModifierGrammar.hpp +++ b/src/openvic-dataloader/v2script/ModifierGrammar.hpp @@ -3,14 +3,15 @@ #include "SimpleGrammar.hpp" #include "TriggerGrammar.hpp" #include <lexy/dsl.hpp> +#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp> namespace ovdl::v2script::grammar { constexpr auto modifier_keyword = LEXY_KEYWORD("modifier", lexy::dsl::inline_<Identifier>); constexpr auto factor_keyword = LEXY_KEYWORD("factor", lexy::dsl::inline_<Identifier>); struct FactorStatement { - static constexpr auto rule = factor_keyword >> lexy::dsl::equal_sign + lexy::dsl::p<Identifier>; - static constexpr auto value = lexy::forward<ast::NodePtr>; + static constexpr auto rule = factor_keyword >> lexy::dsl::equal_sign + lexy::dsl::inline_<Identifier>; + static constexpr auto value = lexy::as_string<std::string> | lexy::new_<ast::FactorNode, ast::NodePtr>; }; struct ModifierStatement { |