| 74 | } |
| 75 | |
| 76 | static TSNode child_named(TSNode parent, const char *kind) { |
| 77 | if (ts_node_is_null(parent)) |
| 78 | return parent; |
| 79 | uint32_t nc = ts_node_child_count(parent); |
| 80 | for (uint32_t i = 0; i < nc; i++) { |
| 81 | TSNode c = ts_node_child(parent, i); |
| 82 | if (!ts_node_is_null(c) && strcmp(ts_node_type(c), kind) == 0) |
| 83 | return c; |
| 84 | } |
| 85 | TSNode null_node; |
| 86 | memset(&null_node, 0, sizeof(null_node)); |
| 87 | return null_node; |
| 88 | } |
| 89 | |
| 90 | /* PHP qualified names use "." in the graph (project.path.module.class[.method]). |
| 91 | * Convert "App\\Models\\User" to "App.Models.User" so we can compose with |
no outgoing calls
no test coverage detected