@@ -66,6 +66,107 @@ let raw_bytes = br#"This won't escape anything either \x01 \""#;
66
66
// ^^ storage.type
67
67
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double - constant.character.escape
68
68
69
+ let b_simple = b'a' ;
70
+ // ^^^^ string.quoted.single
71
+ // ^ storage.type.string
72
+ // ^ punctuation.definition.string.begin
73
+ // ^ punctuation.definition.string.end
74
+ // ^ punctuation.terminator
75
+ let b_newline = b'\n' ;
76
+ // ^^^^^ string.quoted.single
77
+ // ^^ string.quoted.single constant.character.escape
78
+ let b_nul = b'\0' ;
79
+ // ^^ string.quoted.single constant.character.escape
80
+ let b_back = b'\\' ;
81
+ // ^^ string.quoted.single constant.character.escape
82
+ let b_quote = b'\'' ;
83
+ // ^^ string.quoted.single constant.character.escape
84
+ let b_esc_nul = b'\x00' ;
85
+ // ^^^^ string.quoted.single constant.character.escape
86
+ let b_esc_255 = b'\xff' ;
87
+ // ^^^^ string.quoted.single constant.character.escape
88
+ let b_esc_inv = b'\a' ;
89
+ // ^^ invalid.illegal.byte
90
+ // ^ string.quoted.single punctuation.definition.string.end
91
+ let b_inv_len = b' abc' ;
92
+ // ^ string.quoted.single
93
+ // ^^ invalid.illegal.byte
94
+ // ^ string.quoted.single punctuation.definition.string.end
95
+ let b_inv_uni = b'♥' ;
96
+ // ^ invalid.illegal.byte
97
+ // ^ string.quoted.single punctuation.definition.string.end
98
+ let b_inv_empty = b'' ;
99
+ // ^^^ string.quoted.single
100
+ // ^ punctuation.definition.string.begin
101
+ // ^ punctuation.definition.string.end
102
+ let b_unclosed1 = b'
103
+ // Avoid error on entire file.
104
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.double-slash - invalid - string
105
+
106
+ let bs_newline = b"abc\n " ;
107
+ // ^^^^^^^^ string.quoted.double
108
+ // ^ punctuation.definition.string.begin
109
+ // ^^ constant.character.escape
110
+ // ^ punctuation.definition.string.end
111
+ // ^ punctuation.terminator
112
+ let bs_nul = b"abc\0 " ;
113
+ // ^^ string.quoted.double constant.character.escape
114
+ let bs_esc_nul = b"abc\x00 " ;
115
+ // ^^^^ string.quoted.double constant.character.escape
116
+ let bs_esc_255 = b"abc\xff " ;
117
+ // ^^^^ string.quoted.double constant.character.escape
118
+ let bs_esc_inv = b"abc\a " ;
119
+ // ^^ string.quoted.double invalid.illegal.character.escape
120
+ // ^ string.quoted.double punctuation.definition.string.end - invalid
121
+
122
+ let char_newline = '\n' ;
123
+ // ^^^^ string.quoted.single
124
+ // ^ punctuation.definition.string.begin
125
+ // ^^ constant.character.escape
126
+ // ^ punctuation.definition.string.end
127
+ // ^ punctuation.terminator
128
+ let char_nul = '\0' ;
129
+ // ^^ string.quoted.single constant.character.escape
130
+ let char_extra_inv = ' ab' ;
131
+ // ^ string.quoted.single
132
+ // ^ invalid.illegal.char
133
+ // ^ string.quoted.single punctuation.definition.string.end
134
+ let char_ascii_esc_nul = '\x00' ;
135
+ // ^^^^ string.quoted.single constant.character.escape
136
+ let char_ascii_esc_127 = '\x7f' ;
137
+ // ^^^^ string.quoted.single constant.character.escape
138
+ let char_ascii_inv_255 = '\xff' ;
139
+ // ^^^^ invalid.illegal.char
140
+ let char_uni_esc = '\u{3b1}' ;
141
+ // ^^^^^^^ string.quoted.single constant.character.escape
142
+ let char_uni_esc_empty = ' \u{} ' ;
143
+ // ^^^^ invalid.illegal.char
144
+ let char_uni_esc_under_start = ' \u{_1_} ' ;
145
+ // ^^^^^^^ invalid.illegal.char
146
+ let char_uni_esc_under1 = ' \u{1_} ' ;
147
+ // ^^^^^^ string.quoted.single constant.character.escape
148
+ let char_uni_esc_under2 = ' \u{1_2__3___} ' ;
149
+ // ^^^^^^^^^^^^^ string.quoted.single constant.character.escape
150
+ let char_uni_esc_under3 = ' \u{10__FFFF} ' ;
151
+ // ^^^^^^^^^^^^ string.quoted.single constant.character.escape
152
+ let char_uni_esc_extra = '\u{1234567}' ;
153
+ // ^^^^^^^^^^^ invalid.illegal.char
154
+
155
+ let s_ascii_inv_255 = "\xff " ;
156
+ // ^^ string.quoted.double invalid.illegal.character.escape
157
+ let s_uni_esc_empty = "\u{} " ;
158
+ // ^^^^ string.quoted.double invalid.illegal.character.escape
159
+ let s_uni_esc_under_start = "\u{_1_} ";
160
+ // ^^^^^^^ string.quoted.double invalid.illegal.character.escape
161
+ let s_uni_esc_under1 = "\u{1_} " ;
162
+ // ^^^^^^ string.quoted.double constant.character.escape
163
+ let s_uni_esc_under2 = "\u{1_2__3___} ";
164
+ // ^^^^^^^^^^^^^ string.quoted.double constant.character.escape
165
+ let s_uni_esc_under3 = "\u{10__FFFF} ";
166
+ // ^^^^^^^^^^^^ string.quoted.double constant.character.escape
167
+ let s_uni_esc_extra = "\u{1234567} " ;
168
+ // ^^^^^^^^^^^ string.quoted.double invalid.illegal.character.escape
169
+
69
170
0 ;
70
171
// <- constant.numeric.integer.decimal
71
172
1_000u32 ;
0 commit comments