Properly merge transitions on overlapping character sets!

This commit is contained in:
Max Brunsfeld 2014-02-10 13:20:43 -08:00
parent 905a408998
commit 8baa1396fd
15 changed files with 330 additions and 207 deletions

View file

@ -154,6 +154,10 @@ namespace tree_sitter {
return removed_set;
}
bool CharacterSet::is_empty() const {
return ranges.empty();
}
void CharacterSet::add_set(const CharacterSet &other) {
for (auto &other_range : other.ranges) {
add_range(this, other_range);