tree-sitter/test/fixtures/test_grammars/unicode_classes/grammar.json
2021-02-17 13:29:30 -08:00

36 lines
623 B
JSON

{
"name": "unicode_classes",
"extras": [
{"type": "PATTERN", "value": "\\s"}
],
"rules": {
"program": {
"type": "REPEAT",
"content": {
"type": "CHOICE",
"members": [
{"type": "SYMBOL", "name": "lower"},
{"type": "SYMBOL", "name": "upper"},
{"type": "SYMBOL", "name": "math_sym"}
]
}
},
"lower": {
"type": "PATTERN",
"value": "\\p{Ll}\\p{L}*"
},
"upper": {
"type": "PATTERN",
"value": "\\p{Lu}\\p{L}*"
},
"math_sym": {
"type": "PATTERN",
"value": "\\p{Sm}+"
}
}
}