Remove ItemSet class; just use a set

This commit is contained in:
Max Brunsfeld 2014-01-13 18:47:57 -08:00
parent 29f73afbc5
commit d015d57a53
11 changed files with 93 additions and 162 deletions

View file

@ -33,6 +33,10 @@ namespace tree_sitter {
return rule_names_eq && rules_eq && consumed_sym_counts_eq;
}
bool Item::operator<(const Item &other) const {
return rule_name < other.rule_name;
}
bool Item::is_done() const {
for (auto pair : rule_transitions(rule))
if (*pair.first == rules::Blank())