Collapse rules that contain only a single token

This commit is contained in:
Max Brunsfeld 2014-01-05 01:19:32 -08:00
parent 04d18b56ed
commit 0985fa3008
7 changed files with 70 additions and 61 deletions

View file

@ -31,7 +31,6 @@ namespace tree_sitter {
void add_shift_actions(const ItemSet &item_set, size_t state_index) {
auto x = item_set.sym_transitions(grammar);
for (auto transition : x) {
rules::Symbol symbol = *transition.first;
ItemSet item_set = *transition.second;
size_t new_state_index = add_parse_state(item_set);