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
33
core/SqlAstSelectList.h
Normal file
33
core/SqlAstSelectList.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue