Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/common/languages/highlights/regex.scm
3296 views
1
; Order matters! Place lower precedence first.
2
[
3
"?"
4
"="
5
"!"
6
] @keyword.operator.regexp
7
8
[
9
"("
10
")"
11
] @punctuation.definition.group.regexp
12
13
[
14
">"
15
"{"
16
"}"
17
] @punctuation.regexp
18
19
[
20
"["
21
"]"
22
] @punctuation.definition.character-class.regexp
23
24
(
25
([
26
"(?<"
27
] @punctuation.definition.group.assertion.regexp)
28
.
29
[
30
"="
31
"!"
32
] @punctuation.definition.group.assertion.regexp
33
) @meta.assertion.look-behind.regexp
34
35
(
36
([
37
"(?"
38
] @punctuation.definition.group.assertion.regexp)
39
.
40
[
41
"="
42
"!"
43
] @punctuation.definition.group.assertion.regexp
44
) @meta.assertion.look-ahead.regexp
45
46
"(?:" @punctuation.definition.group.regexp @punctuation.definition.group.no-capture.regexp
47
48
(lookaround_assertion ("!") @punctuation.definition.group.assertion.regexp)
49
50
(named_capturing_group) @punctuation.definition.group.regexp
51
52
(group_name) @variable.other.regexp
53
54
[
55
(control_letter_escape)
56
(non_boundary_assertion)
57
] @string.escape.regexp
58
59
[
60
(start_assertion)
61
(end_assertion)
62
(boundary_assertion)
63
] @keyword.control.anchor.regexp
64
65
(class_character) @constant.character-class.regexp
66
67
(identity_escape) @constant.character.escape.regexp
68
69
[
70
((identity_escape) @internal.regexp (#match? @internal.regexp "\\[^ux]"))
71
] @constant.character.escape.regexp
72
73
(
74
((identity_escape) @internal.regexp (#eq? @internal.regexp "\\u"))
75
.
76
(pattern_character) @constant.character.numeric.regexp
77
.
78
(pattern_character) @constant.character.numeric.regexp
79
.
80
(pattern_character) @constant.character.numeric.regexp
81
.
82
(pattern_character) @constant.character.numeric.regexp
83
) @constant.character.numeric.regexp
84
85
(
86
((identity_escape) @internal.regexp (#eq? @internal.regexp "\\x"))
87
.
88
(pattern_character) @constant.character.numeric.regexp
89
.
90
(pattern_character) @constant.character.numeric.regexp
91
) @constant.character.numeric.regexp
92
93
(
94
((identity_escape) @internal.regexp (#eq? @internal.regexp "\\x"))
95
.
96
(class_character) @constant.character.numeric.regexp
97
.
98
(class_character) @constant.character.numeric.regexp
99
) @constant.character.numeric.regexp
100
101
(control_escape) @constant.other.character-class.regexp
102
103
(character_class_escape) @constant.character.escape.regexp
104
105
(decimal_escape) @keyword.other.back-reference.regexp
106
107
("|") @keyword.operator.or.regexp
108
109
[
110
"*"
111
"+"
112
] @keyword.operator.quantifier.regexp
113
114
(count_quantifier) @keyword.operator.quantifier.regexp
115
116
[
117
(lazy)
118
] @keyword.operator.quantifier.regexp
119
120
(optional ("?") @keyword.operator.quantifier.regexp)
121
122
(character_class
123
[
124
"^" @keyword.operator.negation.regexp
125
(class_range "-" @constant.other.character-class.range.regexp)
126
])
127
128