| 907 | } |
| 908 | |
| 909 | static bool is_teal_function_binding(TSNode node) { |
| 910 | TSNode arguments = {0}; |
| 911 | for (TSNode current = ts_node_parent(node); !ts_node_is_null(current); |
| 912 | current = ts_node_parent(current)) { |
| 913 | const char *kind = ts_node_type(current); |
| 914 | if (ts_node_is_null(arguments) && strcmp(kind, "arguments") == 0) { |
| 915 | arguments = current; |
| 916 | continue; |
| 917 | } |
| 918 | if (strcmp(kind, "function_signature") == 0) { |
| 919 | return !ts_node_is_null(arguments) && |
| 920 | any_field_contains_node(current, "arguments", node); |
| 921 | } |
| 922 | if (strcmp(kind, "function_statement") == 0) { |
| 923 | if (ts_node_is_null(arguments)) { |
| 924 | return false; |
| 925 | } |
| 926 | TSNode signature = ts_node_child_by_field_name(current, TS_FIELD("signature")); |
| 927 | return node_contains(signature, arguments); |
| 928 | } |
| 929 | } |
| 930 | return false; |
| 931 | } |
| 932 | |
| 933 | static bool is_commonlisp_defun_binding(TSNode node) { |
| 934 | for (TSNode parent = ts_node_parent(node); !ts_node_is_null(parent); |
no test coverage detected