File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -243,13 +243,12 @@ auto process_cpp_line(
243
243
}
244
244
}
245
245
else if (in_raw_string_literal) {
246
- auto d_char_seq_len = d_char_sequence.size ();
247
- switch (line[i]) {
248
- break ;case ' \" ' : if ( i > d_char_seq_len && peek (-d_char_seq_len-1 ) == ' )' ) {
249
- in_raw_string_literal = (d_char_sequence != line.substr (i-d_char_seq_len, d_char_seq_len));
250
- }
251
- break ;default : ;
246
+ auto end_pos = line.find (d_char_sequence, i);
247
+ if (end_pos == std::string::npos) {
248
+ return r;
252
249
}
250
+ in_raw_string_literal = false ;
251
+ i = end_pos+d_char_sequence.size ()-1 ;
253
252
}
254
253
else {
255
254
r.all_comment_line = false ;
@@ -260,7 +259,7 @@ auto process_cpp_line(
260
259
i+=2 ;
261
260
if (i < ssize (line) - 1 ) {
262
261
if (auto paren_pos = line.find (" (" , i); paren_pos != std::string::npos) {
263
- d_char_sequence = line.substr (i, paren_pos-i);
262
+ d_char_sequence = " ) " + line.substr (i, paren_pos-i)+ " \" " ;
264
263
in_raw_string_literal = true ;
265
264
}
266
265
}
You can’t perform that action at this time.
0 commit comments