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

33
core/SqlAstSelectList.h Normal file
View file

@ -0,0 +1,33 @@
#ifndef SQLASTSELECTLIST_H
#define SQLASTSELECTLIST_H
#include "SqlAstNode.h"
#include <memory>
#include <vector>
class SqlParser;
namespace SqlAst {
class SelectListEntry;
class SelectList: public Node {
public:
using EntrySPtr = std::shared_ptr<SelectListEntry>;
void add(EntrySPtr entry)
{
entryList.push_back(entry);
}
private:
using EntryList = std::vector<EntrySPtr>;
EntryList entryList;
};
std::shared_ptr<SqlAst::SelectList> parseSelectList(SqlParser &parser);
}
#endif // SQLASTSELECTLIST_H