tree-sitter/src/compiler/compile.cc

14 lines
542 B
C++
Raw Normal View History

#include "tree_sitter/compiler.h"
2014-03-09 21:37:21 -07:00
#include "compiler/prepare_grammar/prepare_grammar.h"
#include "compiler/build_tables/build_tables.h"
#include "compiler/generate_code/c_code.h"
#include "compiler/prepared_grammar.h"
2014-01-11 15:14:17 -08:00
namespace tree_sitter {
std::string compile(const Grammar &grammar, std::string name) {
auto grammars = prepare_grammar::prepare_grammar(grammar);
auto tables = build_tables::build_tables(grammars.first, grammars.second);
return generate_code::c_code(name, tables.first, tables.second);
2014-01-11 15:14:17 -08:00
}
}