Add discard command
Change-Id: Ie2243188694657665240769d93b2835034e48c3a
diff --git a/src/grammars.hpp b/src/grammars.hpp
index 688394e..03753e8 100644
--- a/src/grammars.hpp
+++ b/src/grammars.hpp
@@ -36,6 +36,7 @@
x3::rule<leaf_data_uint_class, uint32_t> const leaf_data_uint = "leaf_data_uint";
x3::rule<leaf_data_string_class, std::string> const leaf_data_string = "leaf_data_string";
+x3::rule<discard_class, discard_> const discard = "discard";
x3::rule<ls_class, ls_> const ls = "ls";
x3::rule<cd_class, cd_> const cd = "cd";
x3::rule<set_class, set_> const set = "set";
@@ -176,8 +177,11 @@
auto const commit_def =
lit("commit") >> x3::attr(commit_());
+auto const discard_def =
+ lit("discard") >> x3::attr(discard_());
+
auto const command_def =
- x3::expect[cd | create | delete_rule | set | commit | get | ls] >> x3::eoi;
+ x3::expect[cd | create | delete_rule | set | commit | get | ls | discard] >> x3::eoi;
#if __clang__
#pragma GCC diagnostic pop
@@ -209,6 +213,7 @@
BOOST_SPIRIT_DEFINE(commit)
BOOST_SPIRIT_DEFINE(get)
BOOST_SPIRIT_DEFINE(ls)
+BOOST_SPIRIT_DEFINE(discard)
BOOST_SPIRIT_DEFINE(cd)
BOOST_SPIRIT_DEFINE(create)
BOOST_SPIRIT_DEFINE(delete_rule)