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)
| 2642 | /// parenthesized_declarator exposes no `declarator` field, so that arm always |
| 2643 | /// terminates — bug-for-bug with getChildByField returning null there.) |
| 2644 | fn c_declarator_identifier(node: Node) -> Option<Node> { |
| 2645 | let mut cur = Some(node); |
| 2646 | let mut guard = 0; |
| 2647 | while let Some(n) = cur { |
| 2648 | guard += 1; |
| 2649 | if guard > 12 { |
| 2650 | return None; |
| 2651 | } |
| 2652 | match n.kind() { |
| 2653 | "identifier" => return Some(n), |
| 2654 | "function_declarator" => return None, |
| 2655 | "init_declarator" | "pointer_declarator" | "array_declarator" |
| 2656 | | "parenthesized_declarator" => { |
| 2657 | cur = n.child_by_field_name("declarator"); |
| 2658 | } |
| 2659 | _ => return None, |
| 2660 | } |
| 2661 | } |
| 2662 | None |
| 2663 | } |
| 2664 | |
| 2665 | /// CLASS_LIKE_SPECIFIERS (languages/c-cpp.ts). |
| 2666 | fn is_class_like_specifier(kind: &str) -> bool { |
no outgoing calls
no test coverage detected