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