diff --git a/LineParser.cpp b/LineParser.cpp index 415061b..57a841d 100644 --- a/LineParser.cpp +++ b/LineParser.cpp @@ -9,7 +9,7 @@ namespace coreutils { } int LineParser::parse() { - + diff --git a/LineParser.h b/LineParser.h index 6d05198..d9be254 100644 --- a/LineParser.h +++ b/LineParser.h @@ -11,7 +11,7 @@ namespace coreutils { public: LineParser(StreamReader &reader); - virtual int parse(); + int parse() override; }; diff --git a/Parser.cpp b/Parser.cpp index 0b38d8e..7b2dc9d 100644 --- a/Parser.cpp +++ b/Parser.cpp @@ -7,15 +7,15 @@ namespace coreutils { Parser::~Parser() {} - int Parser::doParse() { + Status Parser::doParse() { buffer << reader.unparsed(); reader.setParsed(); } bool Parser::checkParse(Parser &parser); - int Parser::Parse() { - + Status Parser::parse() { + return Status::COMPLETE; } } diff --git a/Parser.h b/Parser.h index 66e40f1..fe83062 100644 --- a/Parser.h +++ b/Parser.h @@ -26,8 +26,9 @@ namespace coreutils { /// /// - enum class Status : int { - + enum class Status { + COMPLETE, + INCOMPLETE }; /// @@ -40,7 +41,7 @@ namespace coreutils { /// doParse is the entry and re-entry point method to continue the parsing process. /// - int doParse(); + Status doParse(); /// /// Inside of parse() you can call another parser object with the checkParse method to @@ -53,7 +54,7 @@ namespace coreutils { /// /// - virtual int parse(); + virtual Status parse(); protected: MString buffer;