aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script/ModifierGrammar.hpp
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-09-15 19:13:28 +0200
committer Spartan322 <Megacake1234@gmail.com>2023-09-15 19:46:18 +0200
commit338bb84a5f5f883fb50fbe4f64398ab40dad74fe (patch)
treee9a6f4e6a7b3d8df0744747adf525462924425f4 /src/openvic-dataloader/v2script/ModifierGrammar.hpp
parent2564d91f23a0b2a332d0d72023caa4091a56d1f1 (diff)
Add ParseOptions:
NoEscapeString to true to prevent escape behavior in strings Event and Decision grammars use string escaping (for now) Update lexy to latest master: Use `git submodule update --init --recursive`
Diffstat (limited to 'src/openvic-dataloader/v2script/ModifierGrammar.hpp')
-rw-r--r--src/openvic-dataloader/v2script/ModifierGrammar.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic-dataloader/v2script/ModifierGrammar.hpp b/src/openvic-dataloader/v2script/ModifierGrammar.hpp
index 632cfd5..96e928c 100644
--- a/src/openvic-dataloader/v2script/ModifierGrammar.hpp
+++ b/src/openvic-dataloader/v2script/ModifierGrammar.hpp
@@ -8,11 +8,11 @@
#include "TriggerGrammar.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>);
+ constexpr auto modifier_keyword = LEXY_KEYWORD("modifier", lexy::dsl::inline_<Identifier<StringEscapeOption>>);
+ constexpr auto factor_keyword = LEXY_KEYWORD("factor", lexy::dsl::inline_<Identifier<StringEscapeOption>>);
struct FactorStatement {
- static constexpr auto rule = factor_keyword >> lexy::dsl::equal_sign + lexy::dsl::inline_<Identifier>;
+ static constexpr auto rule = factor_keyword >> lexy::dsl::equal_sign + lexy::dsl::inline_<Identifier<StringEscapeOption>>;
static constexpr auto value = lexy::as_string<std::string> | lexy::new_<ast::FactorNode, ast::NodePtr>;
};