Resolve any method-reference args of a method call. */
| 2713 | |
| 2714 | /* Resolve any method-reference args of a method call. */ |
| 2715 | static uint32_t bind_method_ref_args(JavaLSPContext *ctx, TSNode call_node, |
| 2716 | const CBMRegisteredFunc *resolved, const CBMType *recv_type) { |
| 2717 | uint32_t handled = 0; |
| 2718 | if (!resolved) |
| 2719 | return handled; |
| 2720 | TSNode args_node = ts_node_child_by_field_name(call_node, "arguments", 9); |
| 2721 | if (ts_node_is_null(args_node)) |
| 2722 | return handled; |
| 2723 | uint32_t n = ts_node_named_child_count(args_node); |
| 2724 | for (uint32_t i = 0; i < n && i < 32; i++) { |
| 2725 | TSNode arg = ts_node_named_child(args_node, i); |
| 2726 | if (strcmp(ts_node_type(arg), "method_reference") != 0) |
| 2727 | continue; |
| 2728 | resolve_method_reference(ctx, arg, resolved, (int)i, recv_type); |
| 2729 | handled |= ((uint32_t)1u << i); |
| 2730 | } |
| 2731 | return handled; |
| 2732 | } |
| 2733 | |
| 2734 | /* Lookup the method that a method_invocation node resolves to. Returns |
| 2735 | * NULL if the receiver type is unknown. Used by bind_lambda_args / |
no test coverage detected