VimScript: resolve function_definition name from function_declaration child.
| 349 | |
| 350 | // VimScript: resolve function_definition name from function_declaration child. |
| 351 | static TSNode resolve_vimscript_func_name(TSNode node) { |
| 352 | TSNode decl = cbm_find_child_by_kind(node, "function_declaration"); |
| 353 | if (!ts_node_is_null(decl) && ts_node_named_child_count(decl) > 0) { |
| 354 | return ts_node_named_child(decl, 0); |
| 355 | } |
| 356 | if (ts_node_named_child_count(node) > 0) { |
| 357 | return ts_node_named_child(node, 0); |
| 358 | } |
| 359 | TSNode null_node = {0}; |
| 360 | return null_node; |
| 361 | } |
| 362 | |
| 363 | // Resolve function name for scripting/niche languages (Lua, OCaml, SQL, Zig, VimScript, Julia). |
| 364 | static TSNode resolve_func_name_scripting(TSNode node, CBMLanguage lang, const char *kind) { |
no test coverage detected