Add commit command
Change-Id: If8ff0ec34f5a187b3585ac0ff98e06fba699f809
diff --git a/src/grammars.hpp b/src/grammars.hpp
index 06e1bf8..4980e3a 100644
--- a/src/grammars.hpp
+++ b/src/grammars.hpp
@@ -39,6 +39,7 @@
x3::rule<set_class, set_> const set = "set";
x3::rule<create_class, create_> const create = "create";
x3::rule<delete_class, delete_> const delete_rule = "delete_rule";
+x3::rule<commit_class, commit_> const commit = "commit";
x3::rule<command_class, command_> const command = "command";
#if __clang__
@@ -141,8 +142,11 @@
auto const set_def =
lit("set") >> space_separator > leafPath > leaf_data;
+auto const commit_def =
+ lit("commit") >> x3::attr(commit_());
+
auto const command_def =
- x3::expect[cd | create | delete_rule | set | ls] >> x3::eoi;
+ x3::expect[cd | create | delete_rule | set | commit | ls] >> x3::eoi;
#if __clang__
#pragma GCC diagnostic pop
@@ -169,6 +173,7 @@
BOOST_SPIRIT_DEFINE(leaf_data_uint)
BOOST_SPIRIT_DEFINE(leaf_data_string)
BOOST_SPIRIT_DEFINE(set)
+BOOST_SPIRIT_DEFINE(commit)
BOOST_SPIRIT_DEFINE(ls)
BOOST_SPIRIT_DEFINE(cd)
BOOST_SPIRIT_DEFINE(create)