A member whose header did not parse: an error node among its own parts, or * (for a callable) an error anywhere outside its body. Its name and signature * cannot be trusted then -- `public safe extern int M();` comes back as a * method named `extern`. */
| 2202 | * cannot be trusted then -- `public safe extern int M();` comes back as a |
| 2203 | * method named `extern`. */ |
| 2204 | static bool cs_header_broken(TSNode decl, bool callable) { |
| 2205 | TSNode body = callable ? cs_field(decl, "body") : (TSNode){0}; |
| 2206 | bool broken = false; |
| 2207 | cs_kids_t k = cs_kids(decl); |
| 2208 | TSNode ch; |
| 2209 | while (!broken && cs_kids_next(&k, &ch)) { |
| 2210 | if (!ts_node_is_null(body) && ts_node_eq(ch, body)) { |
| 2211 | continue; |
| 2212 | } |
| 2213 | broken = cs_kind_is(ch, "ERROR") || ts_node_is_missing(ch) || |
| 2214 | (callable && ts_node_has_error(ch)); |
| 2215 | } |
| 2216 | cs_kids_end(&k); |
| 2217 | return broken; |
| 2218 | } |
| 2219 | |
| 2220 | static void cs_collect_member(cs_scan_t *s, TSNode c, const char *k, int owner) { |
| 2221 | TSNode null_node = {0}; |
no test coverage detected