`@ref name`: the name after the command (sentence punctuation dropped, * `()` kept); returns the position after it. */
| 262 | /* `@ref name`: the name after the command (sentence punctuation dropped, |
| 263 | * `()` kept); returns the position after it. */ |
| 264 | static size_t c_ref(const c_emit_t *em, const c_line_t *ln, size_t j, const bool *mask) { |
| 265 | j = c_skip_space(ln->p, j, ln->n); |
| 266 | size_t k = j; |
| 267 | while (k < ln->n && !isspace((unsigned char)ln->p[k]) && ln->p[k] != '"' && !mask[k]) { |
| 268 | k++; |
| 269 | } |
| 270 | size_t e = k; |
| 271 | while (e > j && strchr(".,;:", ln->p[e - SKIP_ONE])) { |
| 272 | e--; |
| 273 | } |
| 274 | if (e > j && ln->p[e - SKIP_ONE] == ')' && !(e - j >= PAIR_LEN && ln->p[e - PAIR_LEN] == '(')) { |
| 275 | e--; /* a closing parenthesis of the prose around it */ |
| 276 | } |
| 277 | c_push(em, ln->p + j, e - j, CBM_DOCLINK_C_REF, ln->line); |
| 278 | return k; |
| 279 | } |
| 280 | |
| 281 | /* A word of an @see paragraph: a token when it has the shape of a symbol. */ |
| 282 | static void c_see_word(const c_emit_t *em, const char *w, size_t n, uint32_t line) { |
no test coverage detected