Start of new ANTLR4 based parser.
Very simple tests pass.
This commit is contained in:
parent
03b4194193
commit
fbbe832a05
44 changed files with 860 additions and 8 deletions
24
pglablib/sqlast/StatementList.cpp
Normal file
24
pglablib/sqlast/StatementList.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "StatementList.h"
|
||||
#include "Statement.h"
|
||||
|
||||
|
||||
using namespace sqlast;
|
||||
|
||||
StatementList::StatementList()
|
||||
{}
|
||||
|
||||
void StatementList::Add(std::unique_ptr<Statement> &&statement)
|
||||
{
|
||||
statements.push_back(std::move(statement));
|
||||
}
|
||||
|
||||
Statement &StatementList::Get(int index)
|
||||
{
|
||||
return *statements[index];
|
||||
}
|
||||
|
||||
int StatementList::Count() const
|
||||
{
|
||||
return static_cast<int>(statements.size());
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue