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)
| 1266 | /// normalizeValue with SCALA_SPEC's unwrap (postfix_expression → first |
| 1267 | /// named child — eta-expansion `handler _`). No layers. |
| 1268 | fn normalize_fn_ref_value(&mut self, v: Node<'t>, from: u32, depth: u32) { |
| 1269 | if depth > 4 { |
| 1270 | return; |
| 1271 | } |
| 1272 | match v.kind() { |
| 1273 | "identifier" => { |
| 1274 | let name = self.text(v).to_string(); |
| 1275 | if name.is_empty() || is_stoplisted(&name) { |
| 1276 | return; |
| 1277 | } |
| 1278 | let p = v.start_position(); |
| 1279 | self.fn_ref_cands.push(Cand { |
| 1280 | from, |
| 1281 | name, |
| 1282 | line: p.row as u32 + 1, |
| 1283 | column_byte: v.start_byte(), |
| 1284 | row: p.row, |
| 1285 | }); |
| 1286 | } |
| 1287 | "postfix_expression" => { |
| 1288 | if let Some(inner) = v.named_child(0) { |
| 1289 | self.normalize_fn_ref_value(inner, from, depth + 1); |
| 1290 | } |
| 1291 | } |
| 1292 | _ => {} |
| 1293 | } |
| 1294 | } |
| 1295 | |
| 1296 | fn scan_fn_ref_subtree(&mut self, node: Node<'t>, depth: u32) { |
| 1297 | if depth > 12 { |
no test coverage detected