| 1409 | } |
| 1410 | |
| 1411 | static TSNode php_callable_reference_leaf(PHPLSPContext *ctx, TSNode call, const char *kind) { |
| 1412 | if (php_callable_reference_has_dynamic_member_name(ctx, call)) { |
| 1413 | return (TSNode){0}; |
| 1414 | } |
| 1415 | TSNode expr = {0}; |
| 1416 | if (strcmp(kind, "function_call_expression") == 0) { |
| 1417 | expr = ts_node_child_by_field_name(call, "function", 8); |
| 1418 | } else { |
| 1419 | expr = ts_node_child_by_field_name(call, "name", 4); |
| 1420 | } |
| 1421 | return php_reference_callee_leaf(ctx, expr); |
| 1422 | } |
| 1423 | |
| 1424 | static void php_stamp_resolved_site(PHPLSPContext *ctx, int first, TSNode site) { |
| 1425 | if (!ctx->resolved_calls || ts_node_is_null(site) || first < 0) { |
no test coverage detected