Sketched rough parser code construction including some SQL AST classes.
This commit is contained in:
parent
f3898599fd
commit
5b20f900fc
15 changed files with 459 additions and 4 deletions
17
core/SqlAstSelect.cpp
Normal file
17
core/SqlAstSelect.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "SqlAstSelect.h"
|
||||
#include "SqlAstSelectList.h"
|
||||
#include "SqlParser.h"
|
||||
|
||||
using namespace SqlAst;
|
||||
|
||||
std::shared_ptr<SqlAst::Select> parseSelect(SqlParser &parser)
|
||||
{
|
||||
std::shared_ptr<SqlAst::Select> ast_select = std::make_shared<SqlAst::Select>();
|
||||
// parse select list of expression + aliasses, required
|
||||
auto select_list = parseSelectList(parser);
|
||||
ast_select->setSelectList(select_list);
|
||||
|
||||
// parse optional from list
|
||||
|
||||
return ast_select;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue