memgraph/cypher/compiler.hpp
2016-02-06 13:45:45 +01:00

27 lines
403 B
C++

#pragma once
#include "tokenizer/cypher_lexer.hpp"
#include "parser.hpp"
namespace cypher
{
class Compiler
{
public:
Compiler() = default;
ast::Ast syntax_tree(const std::string& input)
{
auto parser = cypher::Parser();
auto tokenizer = lexer.tokenize(input);
auto tree = parser.parse(tokenizer);
return tree;
}
private:
CypherLexer lexer;
};
}