Store character rules’ matches in a set, not a vector
This commit is contained in:
parent
5ed5ae7514
commit
716a4a4259
9 changed files with 218 additions and 218 deletions
|
|
@ -44,9 +44,9 @@ namespace tree_sitter {
|
|||
next();
|
||||
is_affirmative = false;
|
||||
}
|
||||
std::vector<CharacterMatch> matches;
|
||||
std::unordered_set<CharacterMatch> matches;
|
||||
while (has_more_input() && (peek() != ']'))
|
||||
matches.push_back(single_char());
|
||||
matches.insert(single_char());
|
||||
return character(matches, is_affirmative);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue