memgraph/cypher/compiler.hpp
2015-12-07 21:51:55 +01:00

27 lines
404 B
C++

#pragma once
#include "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 std::move(tree);
}
private:
CypherLexer lexer;
};
}