Extract shared helper functions from example grammars
This commit is contained in:
parent
29bbff655c
commit
b86203d205
8 changed files with 1888 additions and 1507 deletions
|
|
@ -12,9 +12,8 @@ namespace tree_sitter {
|
|||
|
||||
namespace build_tables {
|
||||
map<ISymbol, set<ISymbol>> follow_sets(const ParseItem &item,
|
||||
const PreparedGrammar &grammar) {
|
||||
const PreparedGrammar &grammar) {
|
||||
map<ISymbol, set<ISymbol>> result;
|
||||
|
||||
for (auto &pair : sym_transitions(item.rule)) {
|
||||
ISymbol symbol = pair.first;
|
||||
rule_ptr next_rule = pair.second;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue