| 954 | } |
| 955 | |
| 956 | static bool is_teal_function_binding(TSNode node) { |
| 957 | TSNode arguments = {0}; |
| 958 | for (TSNode current = ts_node_parent(node); !ts_node_is_null(current); |
| 959 | current = ts_node_parent(current)) { |
| 960 | const char *kind = ts_node_type(current); |
| 961 | if (ts_node_is_null(arguments) && strcmp(kind, "arguments") == 0) { |
| 962 | arguments = current; |
| 963 | continue; |
| 964 | } |
| 965 | if (strcmp(kind, "function_signature") == 0) { |
| 966 | return !ts_node_is_null(arguments) && |
| 967 | any_field_contains_node(current, "arguments", node); |
| 968 | } |
| 969 | if (strcmp(kind, "function_statement") == 0) { |
| 970 | if (ts_node_is_null(arguments)) { |
| 971 | return false; |
| 972 | } |
| 973 | TSNode signature = ts_node_child_by_field_name(current, TS_FIELD("signature")); |
| 974 | return node_contains(signature, arguments); |
| 975 | } |
| 976 | } |
| 977 | return false; |
| 978 | } |
| 979 | |
| 980 | static bool is_commonlisp_defun_binding(TSNode node) { |
| 981 | for (TSNode parent = ts_node_parent(node); !ts_node_is_null(parent); |
no test coverage detected