From eb6ecdcc85ece4eb84b90f3c9bb920dc1ad2b6d1 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 27 Jan 2015 16:01:53 +0100 Subject: Parsers do no longer return the node they have parsed (as this may be ill-defined -- if a parser only parses a partial document via include, there may be many to no nodes that are returned). Parsers should just use the ParserScope.push funciton. All nodes pushed onto the top-level of the ParserScope are added treated as the nodes the parser has parsed. Adapted all code and all tests accordingly. --- src/core/parser/ParserContext.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/parser/ParserContext.hpp') diff --git a/src/core/parser/ParserContext.hpp b/src/core/parser/ParserContext.hpp index 9b6eca0..f6ae89c 100644 --- a/src/core/parser/ParserContext.hpp +++ b/src/core/parser/ParserContext.hpp @@ -30,6 +30,7 @@ #include #include +#include #include namespace ousia { @@ -116,7 +117,7 @@ public: * checked, not the actual result. * @return the parsed node or nullptr if something goes wrong. */ - Rooted link(const std::string &path, const std::string mimetype, + NodeVector link(const std::string &path, const std::string mimetype, const std::string rel, const RttiSet &supportedTypes); /** @@ -137,7 +138,7 @@ public: * checked, not the actual result. * @return the parsed node or nullptr if something goes wrong. */ - Rooted include(const std::string &path, const std::string mimetype, + NodeVector include(const std::string &path, const std::string mimetype, const std::string rel, const RttiSet &supportedTypes); /** -- cgit v1.2.3