memgraph/cypher/compiler.hpp

27 lines
403 B
C++
Raw Normal View History

#pragma once
2015-10-19 01:44:00 +08:00
#include "tokenizer/cypher_lexer.hpp"
2015-10-19 01:44:00 +08:00
#include "parser.hpp"
namespace cypher
{
class Compiler
{
public:
Compiler() = default;
2015-10-30 08:24:01 +08:00
ast::Ast syntax_tree(const std::string& input)
2015-10-19 01:44:00 +08:00
{
auto parser = cypher::Parser();
auto tokenizer = lexer.tokenize(input);
auto tree = parser.parse(tokenizer);
return tree;
2015-10-19 01:44:00 +08:00
}
private:
CypherLexer lexer;
};
}