| 465 | } |
| 466 | |
| 467 | static void c_loose_comment(c_loose_t *lw, TSNode n) { |
| 468 | char style = c_doc_style(lw->ctx->source, n); |
| 469 | uint32_t row = ts_node_start_point(n).row + SKIP_ONE; |
| 470 | if (style == 'l' && lw->pending && row == lw->last + SKIP_ONE) { |
| 471 | lw->end_byte = ts_node_end_byte(n); /* the run goes on */ |
| 472 | lw->last = row; |
| 473 | return; |
| 474 | } |
| 475 | c_loose_flush(lw); |
| 476 | if (style == 'l') { |
| 477 | lw->pending = true; |
| 478 | lw->start_byte = ts_node_start_byte(n); |
| 479 | lw->end_byte = ts_node_end_byte(n); |
| 480 | lw->first = row; |
| 481 | lw->last = row; |
| 482 | } else if (style == 'b') { |
| 483 | c_loose_emit(lw, ts_node_start_byte(n), ts_node_end_byte(n), row, |
| 484 | ts_node_end_point(n).row + SKIP_ONE); |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | void cbm_doclink_c_loose_docs(CBMExtractCtx *ctx, const CBMDefinition *file_def, |
| 489 | cbm_doclink_taken_fn taken) { |
no test coverage detected