A comment node's Doxygen style: 'b' a block, 'l' a line, 0 none. */
| 419 | |
| 420 | /* A comment node's Doxygen style: 'b' a block, 'l' a line, 0 none. */ |
| 421 | static char c_doc_style(const char *src, TSNode n) { |
| 422 | uint32_t b = ts_node_start_byte(n); |
| 423 | uint32_t e = ts_node_end_byte(n); |
| 424 | const char *p = src + b; |
| 425 | size_t len = e - b; |
| 426 | if (c_has(p, len, "/**/") || c_has(p, len, "/***")) { |
| 427 | return 0; |
| 428 | } |
| 429 | if (c_has(p, len, "/**") || c_has(p, len, "/*!")) { |
| 430 | return 'b'; |
| 431 | } |
| 432 | if (c_has(p, len, "////")) { |
| 433 | return 0; |
| 434 | } |
| 435 | return (c_has(p, len, "///") || c_has(p, len, "//!")) ? 'l' : 0; |
| 436 | } |
| 437 | |
| 438 | typedef struct { |
| 439 | CBMExtractCtx *ctx; |
no test coverage detected