Sketched rough parser code construction including some SQL AST classes.

This commit is contained in:
eelke 2018-06-19 19:52:56 +02:00
parent f3898599fd
commit 5b20f900fc
15 changed files with 459 additions and 4 deletions

17
core/SqlAstSelect.cpp Normal file
View 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;
}