Check if a node is a comment node type.
| 1163 | |
| 1164 | // Check if a node is a comment node type. |
| 1165 | static bool is_comment_node(const char *kind) { |
| 1166 | return (strcmp(kind, "comment") == 0 || strcmp(kind, "block_comment") == 0 || |
| 1167 | strcmp(kind, "line_comment") == 0 || strcmp(kind, "multiline_comment") == 0); |
| 1168 | } |
| 1169 | |
| 1170 | // Extract comment text, truncating to MAX_COMMENT_LEN. |
| 1171 | static char *extract_comment_text(CBMArena *a, TSNode node, const char *source) { |
no outgoing calls
no test coverage detected