| 711 | } |
| 712 | |
| 713 | static bool is_cmake_function_parameter(TSNode node) { |
| 714 | if (strcmp(ts_node_type(node), "unquoted_argument") != 0) { |
| 715 | return false; |
| 716 | } |
| 717 | TSNode argument = ts_node_parent(node); |
| 718 | TSNode arguments = ts_node_parent(argument); |
| 719 | TSNode command = ts_node_parent(arguments); |
| 720 | if (ts_node_is_null(argument) || strcmp(ts_node_type(argument), "argument") != 0 || |
| 721 | ts_node_is_null(arguments) || strcmp(ts_node_type(arguments), "argument_list") != 0 || |
| 722 | ts_node_is_null(command) || |
| 723 | (strcmp(ts_node_type(command), "function_command") != 0 && |
| 724 | strcmp(ts_node_type(command), "macro_command") != 0)) { |
| 725 | return false; |
| 726 | } |
| 727 | uint32_t count = ts_node_named_child_count(arguments); |
| 728 | for (uint32_t i = 1; i < count; i++) { |
| 729 | if (node_contains(ts_node_named_child(arguments, i), node)) { |
| 730 | return true; |
| 731 | } |
| 732 | } |
| 733 | return false; |
| 734 | } |
| 735 | |
| 736 | static bool fish_argument_marker(CBMExtractCtx *ctx, TSNode node) { |
| 737 | char *text = cbm_node_text(ctx->arena, node, ctx->source); |
no test coverage detected