Skip to content
Snippets Groups Projects
Commit 2ee7c377 authored by Ondřej Štorc's avatar Ondřej Štorc
Browse files

cli: Disable construction of old parser

parent 29d07f14
No related branches found
No related tags found
1 merge request!256Parser replacement with ANTLR
...@@ -47,13 +47,19 @@ class Parser { ...@@ -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) + ": "; 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) Parser(cli::Lexer lexer)
: m_lexer(std::move(lexer)) : m_lexer(std::move(lexer))
, m_current(m_lexer.nextToken(true)) , 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) void setHint(Lexer::Hint hint)
{ {
m_lexer.setHint(hint); m_lexer.setHint(hint);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment