Remove rule-specific logic from transition map
This commit is contained in:
parent
c10bcf4fab
commit
b3b5b8a05a
13 changed files with 86 additions and 97 deletions
|
|
@ -17,8 +17,8 @@ namespace tree_sitter {
|
|||
return Item(rule_name, grammar.rule(rule_name), 0);
|
||||
}
|
||||
|
||||
TransitionMap<Item> Item::transitions() const {
|
||||
return rules::transitions(rule).map<Item>([&](rules::rule_ptr to_rule) {
|
||||
transition_map<rules::Rule, Item> Item::transitions() const {
|
||||
return rules::transitions(rule).map<Item>([&](rules::rule_ptr to_rule) -> item_ptr {
|
||||
return std::make_shared<Item>(rule_name, to_rule, consumed_sym_count + 1);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue