Move state_id check into each_referenced_state
This commit is contained in:
parent
6897530c47
commit
18ba6ebbd7
2 changed files with 3 additions and 3 deletions
|
|
@ -154,7 +154,8 @@ void ParseState::each_referenced_state(function<void(ParseStateId *)> fn) {
|
|||
if (action.type == ParseActionTypeShift || action.type == ParseActionTypeRecover)
|
||||
fn(&action.state_index);
|
||||
for (auto &entry : nonterminal_entries)
|
||||
fn(&entry.second);
|
||||
if (entry.second != (ParseStateId)(-1))
|
||||
fn(&entry.second);
|
||||
}
|
||||
|
||||
bool ParseState::operator==(const ParseState &other) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue