diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-10-04 01:23:49 +0200 |
---|---|---|
committer | George L. Albany <Megacake1234@gmail.com> | 2023-10-05 01:35:42 +0200 |
commit | 7b1e33c26b4d36be2e3d1292dc539ff17e358589 (patch) | |
tree | 4456832acce290261f5839a083018afbd154ba16 /src/openvic-dataloader/v2script/SimpleGrammar.hpp | |
parent | 02c30fdda7b775782af1163b2321e7d6fcf01fcc (diff) |
Make File contents optional
Add lexy::nullopt support to String and List nodes
Diffstat (limited to 'src/openvic-dataloader/v2script/SimpleGrammar.hpp')
-rw-r--r-- | src/openvic-dataloader/v2script/SimpleGrammar.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvic-dataloader/v2script/SimpleGrammar.hpp b/src/openvic-dataloader/v2script/SimpleGrammar.hpp index a065c7f..9bddabd 100644 --- a/src/openvic-dataloader/v2script/SimpleGrammar.hpp +++ b/src/openvic-dataloader/v2script/SimpleGrammar.hpp @@ -183,7 +183,7 @@ namespace ovdl::v2script::grammar { // Allow arbitrary spaces between individual tokens. static constexpr auto whitespace = whitespace_specifier | comment_specifier; - static constexpr auto rule = lexy::dsl::position + lexy::dsl::terminator(lexy::dsl::eof).list(lexy::dsl::p<AssignmentStatement<Options>>); + static constexpr auto rule = lexy::dsl::position + lexy::dsl::terminator(lexy::dsl::eof).opt_list(lexy::dsl::p<AssignmentStatement<Options>>); static constexpr auto value = lexy::as_list<std::vector<ast::NodePtr>> >> lexy::new_<ast::FileNode, ast::NodePtr>; }; |