Remove inheritance link btwn PreparedGrammar and Grammar

This commit is contained in:
Max Brunsfeld 2014-06-10 10:30:00 -07:00
parent 11acc7d087
commit e105f5cebc
11 changed files with 70 additions and 53 deletions

View file

@ -60,7 +60,7 @@ namespace tree_sitter {
}
void add_ubiquitous_token_actions(const ParseItemSet &item_set, ParseStateId state_id) {
for (const Symbol &symbol : grammar.options.ubiquitous_tokens) {
for (const Symbol &symbol : grammar.ubiquitous_tokens()) {
auto &actions = parse_table.states[state_id].actions;
if (actions.find(symbol) == actions.end())
parse_table.add_action(state_id, symbol, ParseAction::Shift(state_id, { 0 }));