| 325 | } |
| 326 | |
| 327 | static void tm_skip_block_comment(tm_lex_t *lx) { |
| 328 | lx->p += 2; |
| 329 | while (lx->p < lx->end) { |
| 330 | if (*lx->p == '*' && lx->p + 1 < lx->end && lx->p[1] == '/') { |
| 331 | lx->p += 2; |
| 332 | return; |
| 333 | } |
| 334 | if (*lx->p == '*' && tm_splice_len(lx->p + 1, lx->end)) { |
| 335 | tm_lex_uncertain(lx); /* the splice may close the comment */ |
| 336 | } |
| 337 | if (*lx->p == '\n') { |
| 338 | lx->line++; |
| 339 | } |
| 340 | lx->p++; |
| 341 | } |
| 342 | tm_lex_uncertain(lx); /* EOF before the closing comment delimiter */ |
| 343 | } |
| 344 | |
| 345 | /* A string or character literal. It ends at its closing quote, or at the end |
| 346 | * of the line when the quote is missing, so one stray quote costs one line. */ |
no test coverage detected