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

Method normalize_fn_ref_value

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

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