| 625 | } |
| 626 | |
| 627 | static void pl_push(pl_emit_t *em, const char *raw, size_t n, int syntax, uint32_t line) { |
| 628 | char *copy = cbm_arena_strndup(em->ctx->arena, raw, n); |
| 629 | if (!copy) { |
| 630 | return; |
| 631 | } |
| 632 | CBMDocLink link = { |
| 633 | .source_qn = em->def->qualified_name, |
| 634 | .raw = copy, |
| 635 | .line = line, |
| 636 | .def_line = em->def->start_line, |
| 637 | .syntax = (uint16_t)syntax, |
| 638 | }; |
| 639 | cbm_doclinks_push(&em->ctx->result->doc_links, em->ctx->arena, link); |
| 640 | } |
| 641 | |
| 642 | /* One L<> code of em->text -> one token (none for an empty code). */ |
| 643 | static void pl_emit_link(pl_emit_t *em, const pl_code_t *code) { |
no test coverage detected