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

Method normalize_fn_ref_value

codegraph-kernel/src/scala.rs:1289–1316  ·  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

1287 /// normalizeValue with SCALA_SPEC's unwrap (postfix_expression → first
1288 /// named child — eta-expansion `handler _`). No layers.
1289 fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) {
1290 stack_guard!();
1291 if depth > 4 {
1292 return;
1293 }
1294 match v.kind() {
1295 "identifier" => {
1296 let name = self.text(v).to_string();
1297 if name.is_empty() || is_stoplisted(&name) {
1298 return;
1299 }
1300 let p = v.start_position();
1301 self.fn_ref_cands.push(Cand {
1302 from,
1303 name,
1304 line: p.row as u32 + 1,
1305 column_byte: v.start_byte(),
1306 row: p.row,
1307 });
1308 }
1309 "postfix_expression" => {
1310 if let Some(inner) = v.named_child(0) {
1311 self.normalize_fn_ref_value(inner, from, depth + 1);
1312 }
1313 }
1314 _ => {}
1315 }
1316 }
1317
1318 fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) {
1319 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