tree-sitter/src/compiler/compile.cpp

13 lines
438 B
C++
Raw Normal View History

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