MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / normalize_fn_ref_value

Method normalize_fn_ref_value

codegraph-kernel/src/scala.rs:1301–1328  ·  view source on GitHub ↗

normalizeValue with SCALA_SPEC's unwrap (postfix_expression → first named child — eta-expansion `handler _`). No layers.

(&mut self, v: Node<'t>, from: u32, depth: u32)

Source from the content-addressed store, hash-verified

1299 /// normalizeValue with SCALA_SPEC's unwrap (postfix_expression → first
1300 /// named child — eta-expansion `handler _`). No layers.
1301 fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) {
1302 stack_guard!();
1303 if depth > 4 {
1304 return;
1305 }
1306 match v.kind() {
1307 "identifier" => {
1308 let name = self.text(v).to_string();
1309 if name.is_empty() || is_stoplisted(&name) {
1310 return;
1311 }
1312 let p = v.start_position();
1313 self.fn_ref_cands.push(Cand {
1314 from,
1315 name,
1316 line: p.row as u32 + 1,
1317 column_byte: v.start_byte(),
1318 row: p.row,
1319 });
1320 }
1321 "postfix_expression" => {
1322 if let Some(inner) = v.named_child(0) {
1323 self.normalize_fn_ref_value(inner, from, depth + 1);
1324 }
1325 }
1326 _ => {}
1327 }
1328 }
1329
1330 fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) {
1331 stack_guard!();

Callers 1

maybe_capture_fn_refsMethod · 0.45

Calls 3

pushMethod · 0.80
is_stoplistedFunction · 0.70
textMethod · 0.65

Tested by

no test coverage detected