cDeclaratorIdentifier (languages/c-cpp.ts): resolve the declared identifier through init/pointer/array/parenthesized declarator wrappers; a function_declarator means prototype/fn-ptr — null. (The C grammar's parenthesized_declarator exposes no `declarator` field, so that arm always terminates — bug-for-bug with getChildByField returning null there.)
(node: Node)
| 2640 | /// parenthesized_declarator exposes no `declarator` field, so that arm always |
| 2641 | /// terminates — bug-for-bug with getChildByField returning null there.) |
| 2642 | fn c_declarator_identifier(node: Node) -> Option<Node> { |
| 2643 | let mut cur = Some(node); |
| 2644 | let mut guard = 0; |
| 2645 | while let Some(n) = cur { |
| 2646 | guard += 1; |
| 2647 | if guard > 12 { |
| 2648 | return None; |
| 2649 | } |
| 2650 | match n.kind() { |
| 2651 | "identifier" => return Some(n), |
| 2652 | "function_declarator" => return None, |
| 2653 | "init_declarator" | "pointer_declarator" | "array_declarator" |
| 2654 | | "parenthesized_declarator" => { |
| 2655 | cur = n.child_by_field_name("declarator"); |
| 2656 | } |
| 2657 | _ => return None, |
| 2658 | } |
| 2659 | } |
| 2660 | None |
| 2661 | } |
| 2662 | |
| 2663 | /// CLASS_LIKE_SPECIFIERS (languages/c-cpp.ts). |
| 2664 | fn is_class_like_specifier(kind: &str) -> bool { |
no outgoing calls
no test coverage detected