| 1894 | } |
| 1895 | |
| 1896 | static bool binding_is_parameter(CBMExtractCtx *ctx, TSNode node, const CBMLangSpec *spec) { |
| 1897 | const CBMOccurrenceSpec *occurrence = &occurrence_specs[ctx->language]; |
| 1898 | for (TSNode parent = ts_node_parent(node); !ts_node_is_null(parent); |
| 1899 | parent = ts_node_parent(parent)) { |
| 1900 | const char *kind = ts_node_type(parent); |
| 1901 | if (kind_in_exact_set(kind, common_whole_binding_nodes) || |
| 1902 | kind_in_exact_set(kind, occurrence->whole_binding_nodes)) { |
| 1903 | return true; |
| 1904 | } |
| 1905 | if (spec->function_node_types && cbm_kind_in_set(parent, spec->function_node_types)) { |
| 1906 | return field_contains_node(parent, "parameter", node) || |
| 1907 | field_contains_node(parent, "parameters", node); |
| 1908 | } |
| 1909 | } |
| 1910 | return false; |
| 1911 | } |
| 1912 | |
| 1913 | static bool js_var_binding(TSNode node) { |
| 1914 | for (TSNode parent = ts_node_parent(node); !ts_node_is_null(parent); |
no test coverage detected