Resolve name from a C++ qualified_identifier/scoped_identifier.
| 976 | |
| 977 | // Resolve name from a C++ qualified_identifier/scoped_identifier. |
| 978 | static TSNode resolve_qualified_name(TSNode decl) { |
| 979 | static const char *name_kinds[] = {"operator_name", "operator_cast", "destructor_name", |
| 980 | "identifier", "field_identifier", NULL}; |
| 981 | for (const char **k = name_kinds; *k; k++) { |
| 982 | TSNode found = cbm_find_child_by_kind(decl, *k); |
| 983 | if (!ts_node_is_null(found)) { |
| 984 | return found; |
| 985 | } |
| 986 | } |
| 987 | TSNode null_node = {0}; |
| 988 | return null_node; |
| 989 | } |
| 990 | |
| 991 | bool cbm_c_qualifier_is_recovered(TSNode qid) { |
| 992 | if (ts_node_is_null(qid)) { |
no test coverage detected