Add golang example grammar
Also, support '\a' character class shorthand in regexes, for alphabetical characters
This commit is contained in:
parent
13c4e6e648
commit
7adb0bf34f
10 changed files with 4044 additions and 1015 deletions
|
|
@ -133,10 +133,12 @@ namespace tree_sitter {
|
|||
case '(':
|
||||
case ')':
|
||||
return CharacterSet({ value });
|
||||
case 'a':
|
||||
return CharacterSet({ {'a', 'z'}, {'A', 'Z'} });
|
||||
case 'w':
|
||||
return CharacterSet({{'a', 'z'}, {'A', 'Z'}});
|
||||
return CharacterSet({ {'a', 'z'}, {'A', 'Z'}, {'0', '9'}});
|
||||
case 'd':
|
||||
return CharacterSet({CharacterRange('0', '9')});
|
||||
return CharacterSet({ {'0', '9'} });
|
||||
default:
|
||||
error = "unrecognized escape sequence";
|
||||
return CharacterSet();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue