Implement character set difference

This commit is contained in:
Max Brunsfeld 2014-02-07 12:57:35 -08:00
parent b94fa3ed35
commit df3397f02c
7 changed files with 200 additions and 139 deletions

View file

@ -75,7 +75,7 @@ namespace tree_sitter {
}
CharacterSet result;
while (has_more_input() && (peek() != ']'))
result.union_with(single_char());
result.add_set(single_char());
return is_affirmative ? result : result.complement();
}