Allow Character rules to handle arbitrary character sets

This commit is contained in:
Max Brunsfeld 2014-01-29 19:18:21 -08:00
parent bc1d115ee2
commit 7f62e752be
16 changed files with 322 additions and 309 deletions

View file

@ -14,9 +14,13 @@ namespace tree_sitter {
return make_shared<Character>(value);
}
rule_ptr character(CharClass value) {
rule_ptr character(CharacterClass value) {
return make_shared<Character>(value);
}
rule_ptr character(const std::vector<CharacterMatch> &matches, bool is_affirmative) {
return make_shared<Character>(matches, is_affirmative);
}
rule_ptr choice(const initializer_list<rule_ptr> &rules) {
rule_ptr result;