Improve construction of out Parser class.
This commit is contained in:
parent
fbbe832a05
commit
a0ba9b894f
2 changed files with 6 additions and 1 deletions
|
|
@ -3,7 +3,11 @@
|
|||
|
||||
|
||||
Parser::Parser(const std::string &input_string)
|
||||
: InputStream(std::make_unique<antlr4::ANTLRInputStream>(input_string))
|
||||
: Parser(std::make_unique<antlr4::ANTLRInputStream>(input_string))
|
||||
{}
|
||||
|
||||
Parser::Parser(std::unique_ptr<antlr4::CharStream> stream)
|
||||
: InputStream(std::move(stream))
|
||||
, CaseFilter(InputStream.get(), true)
|
||||
, Lexer(&CaseFilter)
|
||||
, TokenStream(&Lexer)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ class Parser
|
|||
{
|
||||
public:
|
||||
Parser(const std::string &input_string);
|
||||
Parser(std::unique_ptr<antlr4::CharStream> stream);
|
||||
|
||||
std::unique_ptr<sqlast::StatementList> Parse();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue