Don't suggest paths when leaf values are expected
Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/122
Change-Id: I1d5588f07558895277b0fdcc6b45c4ad1def8eaf
diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index fd7f52e..9fd65ff 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -327,6 +327,15 @@
}
};
+struct space_separator_class {
+ template <typename T, typename Iterator, typename Context>
+ void on_success(Iterator const&, Iterator const&, T&, Context const& context)
+ {
+ auto& parserContext = x3::get<parser_context_tag>(context);
+ parserContext.m_suggestions.clear();
+ }
+};
+
struct create_class {
template <typename Iterator, typename Exception, typename Context>
x3::error_handler_result on_error(Iterator&, Iterator const&, Exception const&, Context const& context)