|
1 | | -name: 'JavaScript RegExp (Unicode)' |
| 1 | +name: 'Regular Expressions (JavaScript)' |
2 | 2 | scopeName: 'source.js.regexp.unicode' |
3 | 3 | type: 'tree-sitter' |
4 | 4 | parser: 'tree-sitter-regex-unicode-js' |
5 | 5 |
|
6 | | -injectionRegex: '^_$' |
| 6 | +injectionRegex: '^regex_u$' |
7 | 7 |
|
8 | 8 | scopes: |
9 | | - 'regex': 'meta.pattern.regexp' |
| 9 | + 'regex': 'meta.pattern.regex' |
10 | 10 |
|
11 | 11 | 'non_syntax': 'string.other.non-syntax' |
12 | 12 | 'invalid': 'invalid' |
13 | 13 |
|
14 | | - 'disjunction_delimiter': 'keyword.operator.disjunction.regexp' |
| 14 | + 'disjunction_delimiter': 'keyword.operator.disjunction.regex' |
15 | 15 |
|
16 | 16 | ##### quantifiers ##### |
17 | 17 |
|
18 | 18 | #'count_quantifier, one_or_more, zero_or_more, optional': 'storage.modifier' |
19 | | - 'zero_or_more, one_or_more, optional, count_quantifier': 'keyword.operator.quantifier.regexp' |
20 | | - 'count_quantifier > count_quantifier_value': 'constant.numeric.regexp' |
21 | | - 'count_quantifier > count_quantifier_delimiter': 'punctuation.definition.quantifier.count.delimiter.regexp' |
| 19 | + 'zero_or_more, one_or_more, optional, count_quantifier': 'keyword.operator.quantifier.regex' |
| 20 | + 'count_quantifier > count_quantifier_value': 'constant.numeric.regex' |
| 21 | + 'count_quantifier > count_quantifier_delimiter': 'punctuation.definition.quantifier.count.delimiter.regex' |
22 | 22 |
|
23 | 23 | ##### lookaround assertions ##### |
24 | 24 |
|
25 | | - 'lookahead_assertion': 'meta.group.assertion.look-ahead.regexp' |
26 | | - 'lookahead_assertion > lookahead_identifier': 'entity.name.type.look-ahead.regexp' |
27 | | - 'negative_lookahead_assertion': 'meta.group.assertion.negative-look-ahead.regexp' |
28 | | - 'negative_lookahead_assertion > negative_lookahead_identifier': 'entity.name.type.negative-look-ahead.regexp' |
29 | | - 'lookbehind_assertion': 'meta.group.assertion.look-behind.regexp' |
30 | | - 'lookbehind_assertion > lookbehind_identifier': 'entity.name.type.look-behind.regexp' |
31 | | - 'negative_lookbehind_assertion': 'meta.group.assertion.negative-look-behind.regexp' |
32 | | - 'negative_lookbehind_assertion > negative_lookbehind_identifier': 'entity.name.type.negative-look-behind.regexp' |
| 25 | + 'lookahead_assertion': 'meta.group.assertion.look-ahead.regex' |
| 26 | + 'lookahead_assertion > lookahead_identifier': 'entity.name.type.look-ahead.regex' |
| 27 | + 'negative_lookahead_assertion': 'meta.group.assertion.negative-look-ahead.regex' |
| 28 | + 'negative_lookahead_assertion > negative_lookahead_identifier': 'entity.name.type.negative-look-ahead.regex' |
| 29 | + 'lookbehind_assertion': 'meta.group.assertion.look-behind.regex' |
| 30 | + 'lookbehind_assertion > lookbehind_identifier': 'entity.name.type.look-behind.regex' |
| 31 | + 'negative_lookbehind_assertion': 'meta.group.assertion.negative-look-behind.regex' |
| 32 | + 'negative_lookbehind_assertion > negative_lookbehind_identifier': 'entity.name.type.negative-look-behind.regex' |
33 | 33 |
|
34 | 34 | ##### groups and backreferences ##### |
35 | 35 |
|
36 | | - 'numeric_backreference': 'keyword.other.back-reference.numeric.regexp' |
37 | | - 'numeric_backreference > group_name': 'entity.name.tag.regexp' |
38 | | - 'named_backreference': 'keyword.other.back-reference.named.regexp' |
39 | | - 'named_backreference > group_name': 'entity.name.tag.regexp' |
| 36 | + 'numeric_backreference': 'keyword.other.back-reference.numeric.regex' |
| 37 | + 'numeric_backreference > group_name': 'entity.name.tag.regex' |
| 38 | + 'named_backreference': 'keyword.other.back-reference.named.regex' |
| 39 | + 'named_backreference > group_name': 'entity.name.tag.regex' |
40 | 40 |
|
41 | | - 'named_capturing_group': 'meta.group.capturing.named.regexp' |
42 | | - 'named_capturing_group > named_capturing_group_identifier': 'entity.name.type.named.regexp' |
43 | | - 'named_capturing_group > named_capturing_group_identifier > group_name': 'entity.name.tag.regexp' |
44 | | - 'non_capturing_group': 'meta.group.non-capturing.regexp' |
45 | | - 'non_capturing_group > non_capturing_group_identifier': 'entity.name.type.non-capturing.regexp' |
46 | | - 'anonymous_capturing_group': 'meta.group.capturing.anonymous.regexp' |
| 41 | + 'named_capturing_group': 'meta.group.capturing.named.regex' |
| 42 | + 'named_capturing_group > named_capturing_group_identifier': 'entity.name.type.named.regex' |
| 43 | + 'named_capturing_group > named_capturing_group_identifier > group_name': 'entity.name.tag.regex' |
| 44 | + 'non_capturing_group': 'meta.group.non-capturing.regex' |
| 45 | + 'non_capturing_group > non_capturing_group_identifier': 'entity.name.type.non-capturing.regex' |
| 46 | + 'anonymous_capturing_group': 'meta.group.capturing.anonymous.regex' |
47 | 47 |
|
48 | 48 | #'group_name': 'variable.other.object.property' |
49 | 49 |
|
50 | 50 | #'"(", "(?", "(?:", "(?<"': 'punctuation.definition.parameters.begin.bracket.round' |
51 | | - 'group_begin': 'punctuation.definition.group.begin.bracket.round.regexp' |
| 51 | + 'group_begin': 'punctuation.definition.group.begin.bracket.round.regex' |
52 | 52 | #'">", ")"': 'punctuation.definition.parameters.end.bracket.round' |
53 | | - 'group_end': 'punctuation.definition.group.end.bracket.round.regexp' |
| 53 | + 'group_end': 'punctuation.definition.group.end.bracket.round.regex' |
54 | 54 |
|
55 | 55 | ##### character sets ##### |
56 | 56 |
|
57 | | - 'character_class': 'constant.other.character-class.set.regexp' |
58 | | - 'character_class > set_begin': 'punctuation.definition.character-class.set.begin.regexp' |
59 | | - 'character_class > set_end': 'punctuation.definition.character-class.set.end.regexp' |
60 | | - 'character_class > set_negation': 'keyword.operator.negation.regexp' |
61 | | - 'character_class > character_range': 'constant.other.character-class.range.regexp' |
62 | | - 'character_class > character_range > range_delimiter': 'punctuation.definition.character-class.range.hyphen.regexp' |
| 57 | + 'character_class': 'constant.other.character-class.set.regex' |
| 58 | + 'character_class > set_begin': 'punctuation.definition.character-class.set.begin.regex' |
| 59 | + 'character_class > set_end': 'punctuation.definition.character-class.set.end.regex' |
| 60 | + 'character_class > set_negation': 'keyword.operator.negation.regex' |
| 61 | + 'character_class > character_range': 'constant.other.character-class.range.regex' |
| 62 | + 'character_class > character_range > range_delimiter': 'punctuation.definition.character-class.range.hyphen.regex' |
63 | 63 |
|
64 | 64 | ##### character classes ##### |
65 | 65 |
|
66 | | - 'character_class_escape': 'constant.other.character-class.escape.regexp' |
67 | | - 'character_class_escape > unicode_property_name': 'constant.other.character-class.unicode-property.name.regexp' |
68 | | - 'character_class_escape > unicode_property_operator': 'keyword.operator.character-class.unicode-property.regexp' |
69 | | - 'character_class_escape > unicode_property_value': 'constant.other.character-class.unicode-property.value.regexp' |
70 | | - 'any_character': 'constant.other.character-class.any.regexp' |
| 66 | + 'character_class_escape': 'constant.other.character-class.escape.regex' |
| 67 | + 'character_class_escape > unicode_property_name': 'constant.other.character-class.unicode-property.name.regex' |
| 68 | + 'character_class_escape > unicode_property_operator': 'keyword.operator.character-class.unicode-property.regex' |
| 69 | + 'character_class_escape > unicode_property_value': 'constant.other.character-class.unicode-property.value.regex' |
| 70 | + 'any_character': 'constant.other.character-class.any.regex' |
71 | 71 |
|
72 | 72 | ##### character escapes ##### |
73 | 73 |
|
74 | | - 'null_character': 'constant.character.numeric.null.regexp' |
75 | | - 'identity_escape': 'constant.character.escape.backslash.regexp' |
76 | | - 'identity_escape > escape_operator': 'keyword.operator.escape-character.regexp' |
77 | | - 'unicode_escape': 'constant.character.numeric.unicode.regexp' |
78 | | - 'unicode_escape > unicode_code': 'constant.character.numeric.unicode.character-code.regexp' |
79 | | - 'unicode_codepoint_escape': 'constant.character.numeric.unicode.regexp' |
80 | | - 'unicode_codepoint_escape > unicode_code': 'constant.character.numeric.unicode.character-code.regexp' |
81 | | - 'octal_escape': 'constant.character.numeric.octal.regexp' |
82 | | - 'octal_escape > octal_code': 'constant.character.numeric.octal.character-code.regexp' |
83 | | - 'hexadecimal_escape': 'constant.character.numeric.hexadecimal.regexp' |
84 | | - 'hexadecimal_escape > hexadecimal_code': 'constant.character.numeric.hexadecimal.character-code.regexp' |
85 | | - 'control_letter_escape': 'constant.character.control.regexp' |
86 | | - 'control_letter_escape > control_letter_code': 'constant.character.control.character-code.regexp' |
87 | | - 'special_escape': 'constant.character.escape.special.regexp' |
88 | | - |
89 | | - 'invalid_unicode_escape': 'constant.character.escape.backslash.invalid.regexp' |
90 | | - 'invalid_unicode_escape > escape_operator': 'keyword.operator.escape-character.regexp' |
91 | | - 'invalid_hexadecimal_escape': 'constant.character.escape.backslash.invalid.regexp' |
92 | | - 'invalid_hexadecimal_escape > escape_operator': 'keyword.operator.escape-character.regexp' |
93 | | - 'invalid_control_letter_escape': 'constant.other.invalid.regexp' |
| 74 | + 'null_character': 'constant.character.numeric.null.regex' |
| 75 | + 'identity_escape': 'constant.character.escape.backslash.regex' |
| 76 | + 'identity_escape > escape_operator': 'keyword.operator.escape-character.regex' |
| 77 | + 'unicode_escape': 'constant.character.numeric.unicode.regex' |
| 78 | + 'unicode_escape > unicode_code': 'constant.character.numeric.unicode.character-code.regex' |
| 79 | + 'unicode_codepoint_escape': 'constant.character.numeric.unicode.regex' |
| 80 | + 'unicode_codepoint_escape > unicode_code': 'constant.character.numeric.unicode.character-code.regex' |
| 81 | + 'octal_escape': 'constant.character.numeric.octal.regex' |
| 82 | + 'octal_escape > octal_code': 'constant.character.numeric.octal.character-code.regex' |
| 83 | + 'hexadecimal_escape': 'constant.character.numeric.hexadecimal.regex' |
| 84 | + 'hexadecimal_escape > hexadecimal_code': 'constant.character.numeric.hexadecimal.character-code.regex' |
| 85 | + 'control_letter_escape': 'constant.character.control.regex' |
| 86 | + 'control_letter_escape > control_letter_code': 'constant.character.control.character-code.regex' |
| 87 | + 'special_escape': 'constant.character.escape.special.regex' |
| 88 | + |
| 89 | + 'invalid_unicode_escape': 'constant.character.escape.backslash.invalid.regex' |
| 90 | + 'invalid_unicode_escape > escape_operator': 'keyword.operator.escape-character.regex' |
| 91 | + 'invalid_hexadecimal_escape': 'constant.character.escape.backslash.invalid.regex' |
| 92 | + 'invalid_hexadecimal_escape > escape_operator': 'keyword.operator.escape-character.regex' |
| 93 | + 'invalid_control_letter_escape': 'constant.other.invalid.regex' |
94 | 94 |
|
95 | 95 | ##### boundary assertions ##### |
96 | 96 |
|
97 | | - #'start_assertion, end_assertion, boundary_assertion, non_boundary_assertion': 'constant.character.character-class.regexp' |
98 | | - 'start_assertion, end_assertion, boundary_assertion, non_boundary_assertion': 'keyword.control.anchor.regexp' |
| 97 | + #'start_assertion, end_assertion, boundary_assertion, non_boundary_assertion': 'constant.character.character-class.regex' |
| 98 | + 'start_assertion, end_assertion, boundary_assertion, non_boundary_assertion': 'keyword.control.anchor.regex' |
0 commit comments