Fix a bug with path parsing
It is now required that the whole path is parsed (that is, there is a
space after the path, or a EOI), when not completing, so that all path
types are tried. Before this, the parser could stop before trying
different path types.
Change-Id: I1964f892418508e6356c4a8811ab00ce1acfa24d
diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index f0bbf4c..943af19 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -558,3 +558,14 @@
});
}
};
+
+struct completing_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);
+
+ if (!parserContext.m_completing)
+ _pass(context) = false;
+ }
+};