diff --git a/alib2cli/src/parser/Parser.h b/alib2cli/src/parser/Parser.h index 403d46454be677551760ab699c90ece7fa0846bb..636cf4f94c13164c37fb96ea47b01ce1ba467bfb 100644 --- a/alib2cli/src/parser/Parser.h +++ b/alib2cli/src/parser/Parser.h @@ -47,13 +47,19 @@ class Parser { return std::string("Line ") + ext::to_string(m_current.m_line) + " at position " + ext::to_string(m_current.m_position) + ": "; } -public: Parser(cli::Lexer lexer) : m_lexer(std::move(lexer)) , m_current(m_lexer.nextToken(true)) { } +public: + static std::unique_ptr<cli::CommandList> parse(cli::Lexer&& lexer) + { + // TODO: Remove, with whole class. Used only for backward compatibility testing + return Parser(std::move(lexer)).parse(); + } + void setHint(Lexer::Hint hint) { m_lexer.setHint(hint);