(state: &mut ExtractionState, node: TsNode<'_>)
| 127 | } |
| 128 | |
| 129 | fn visit_function(state: &mut ExtractionState, node: TsNode<'_>) { |
| 130 | // tree-sitter-haskell: function has a `name` field or first child is the variable name. |
| 131 | let name = Self::extract_function_name(state, node); |
| 132 | let Some(name) = name else { return }; |
| 133 | |
| 134 | let sig = Self::first_line(state, node); |
| 135 | let start_line = node.start_position().row as u32; |
| 136 | let qualified_name = format!("{}::{}", state.file_path, name); |
| 137 | let id = generate_node_id(&state.file_path, &NodeKind::Function, &name, start_line); |
| 138 | |
| 139 | Self::emit( |
| 140 | state, |
| 141 | id, |
| 142 | NodeKind::Function, |
| 143 | name, |
| 144 | qualified_name, |
| 145 | node, |
| 146 | sig, |
| 147 | None, |
| 148 | ); |
| 149 | } |
| 150 | |
| 151 | fn visit_bind(state: &mut ExtractionState, node: TsNode<'_>) { |
| 152 | // `bind` is a pattern binding — skip signatures, only emit function-shaped binds. |
nothing calls this directly
no test coverage detected