MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / visit_bind

Method visit_bind

src/extraction/haskell_extractor.rs:151–171  ·  view source on GitHub ↗
(state: &mut ExtractionState, node: TsNode<'_>)

Source from the content-addressed store, hash-verified

149 }
150
151 fn visit_bind(state: &mut ExtractionState, node: TsNode<'_>) {
152 // `bind` is a pattern binding — skip signatures, only emit function-shaped binds.
153 let name = Self::extract_function_name(state, node);
154 let Some(name) = name else { return };
155
156 let sig = Self::first_line(state, node);
157 let start_line = node.start_position().row as u32;
158 let qualified_name = format!("{}::{}", state.file_path, name);
159 let id = generate_node_id(&state.file_path, &NodeKind::Function, &name, start_line);
160
161 Self::emit(
162 state,
163 id,
164 NodeKind::Function,
165 name,
166 qualified_name,
167 node,
168 sig,
169 None,
170 );
171 }
172
173 fn visit_data_type(state: &mut ExtractionState, node: TsNode<'_>) {
174 // data Foo = ... or newtype Bar = ...

Callers

nothing calls this directly

Calls 2

first_lineFunction · 0.85
generate_node_idFunction · 0.85

Tested by

no test coverage detected