Store character rules’ matches in a set, not a vector

This commit is contained in:
Max Brunsfeld 2014-01-31 18:56:02 -08:00
parent 5ed5ae7514
commit 716a4a4259
9 changed files with 218 additions and 218 deletions

View file

@ -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);
}