Add support for character ranges in regex patterns
This commit is contained in:
parent
60e2d00b4d
commit
0d3a941848
11 changed files with 174 additions and 156 deletions
|
|
@ -87,9 +87,15 @@ namespace tree_sitter {
|
|||
next();
|
||||
break;
|
||||
default:
|
||||
value = peek();
|
||||
char first_char = peek();
|
||||
next();
|
||||
return value;
|
||||
if (peek() == '-') {
|
||||
next();
|
||||
value = CharacterMatch({ first_char, peek() });
|
||||
next();
|
||||
} else {
|
||||
value = first_char;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue