Implement Rule as a union rather than an abstract base class
This commit is contained in:
parent
272e3cc9c6
commit
db4b9ebc7c
109 changed files with 2793 additions and 3120 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#include "compiler/parse_table.h"
|
||||
#include <string>
|
||||
#include "compiler/precedence_range.h"
|
||||
#include "compiler/rules/built_in_symbols.h"
|
||||
#include "compiler/rule.h"
|
||||
|
||||
namespace tree_sitter {
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ ParseAction &ParseTable::add_terminal_action(ParseStateId state_id,
|
|||
void ParseTable::set_nonterminal_action(ParseStateId state_id,
|
||||
Symbol::Index lookahead,
|
||||
ParseStateId next_state_id) {
|
||||
symbols[Symbol(lookahead, Symbol::NonTerminal)].structural = true;
|
||||
symbols[Symbol::non_terminal(lookahead)].structural = true;
|
||||
states[state_id].nonterminal_entries[lookahead] = next_state_id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue