Resolve any method-reference args of a method call. */
| 2788 | |
| 2789 | /* Resolve any method-reference args of a method call. */ |
| 2790 | static uint32_t bind_method_ref_args(JavaLSPContext *ctx, TSNode call_node, |
| 2791 | const CBMRegisteredFunc *resolved, const CBMType *recv_type) { |
| 2792 | uint32_t handled = 0; |
| 2793 | if (!resolved) |
| 2794 | return handled; |
| 2795 | TSNode args_node = ts_node_child_by_field_name(call_node, "arguments", 9); |
| 2796 | if (ts_node_is_null(args_node)) |
| 2797 | return handled; |
| 2798 | uint32_t n = ts_node_named_child_count(args_node); |
| 2799 | for (uint32_t i = 0; i < n && i < 32; i++) { |
| 2800 | TSNode arg = ts_node_named_child(args_node, i); |
| 2801 | if (strcmp(ts_node_type(arg), "method_reference") != 0) |
| 2802 | continue; |
| 2803 | resolve_method_reference(ctx, arg, resolved, (int)i, recv_type); |
| 2804 | handled |= ((uint32_t)1u << i); |
| 2805 | } |
| 2806 | return handled; |
| 2807 | } |
| 2808 | |
| 2809 | /* Lookup the method that a method_invocation node resolves to. Returns |
| 2810 | * NULL if the receiver type is unknown. Used by bind_lambda_args / |
no test coverage detected