| 850 | } |
| 851 | |
| 852 | static TSNode py_lookup_lambda(PyLSPContext *ctx, const char *name) { |
| 853 | TSNode null_node = {0}; |
| 854 | if (!ctx || !name) |
| 855 | return null_node; |
| 856 | for (int i = 0; i < ctx->lambda_count; i++) { |
| 857 | if (ctx->lambdas[i].name && strcmp(ctx->lambdas[i].name, name) == 0) { |
| 858 | return ctx->lambdas[i].lambda_node; |
| 859 | } |
| 860 | } |
| 861 | return null_node; |
| 862 | } |
| 863 | |
| 864 | /* Helper for stripping quotes from a tree-sitter `string` node text. */ |
| 865 | static char *py_string_literal_value(PyLSPContext *ctx, TSNode str_node) { |