Don’t pass rule names to code generator separately from parse tables

This commit is contained in:
Max Brunsfeld 2014-01-25 20:44:02 -08:00
parent b85b15db42
commit 5eb5b61c14
7 changed files with 41 additions and 44 deletions

View file

@ -9,9 +9,6 @@ namespace tree_sitter {
std::string compile(const Grammar &grammar, std::string name) {
auto grammars = prepare_grammar::perform(grammar);
auto tables = build_tables::perform(grammars.first, grammars.second);
auto rule_names = grammars.first.rule_names();
auto token_names = grammars.second.rule_names();
rule_names.insert(rule_names.end(), token_names.begin(), token_names.end());
return generate_code::c_code(name, rule_names, tables.first, tables.second);
return generate_code::c_code(name, tables.first, tables.second);
}
}