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/Parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/parser/Parser.cpp') diff --git a/src/core/parser/Parser.cpp b/src/core/parser/Parser.cpp index 2978669..4e5016d 100644 --- a/src/core/parser/Parser.cpp +++ b/src/core/parser/Parser.cpp @@ -24,15 +24,15 @@ namespace ousia { /* Class Parser */ -Rooted Parser::parse(CharReader &reader, ParserContext &ctx) +void Parser::parse(CharReader &reader, ParserContext &ctx) { - return doParse(reader, ctx); + doParse(reader, ctx); } -Rooted Parser::parse(const std::string &str, ParserContext &ctx) +void Parser::parse(const std::string &str, ParserContext &ctx) { CharReader reader{str}; - return doParse(reader, ctx); + doParse(reader, ctx); } } -- cgit v1.2.3