extractCall — the kotlin paths: navigation member branch (+ the #750 re-encode) and the raw-text else (paren-then-lambda / glued-invoke garbage preserved). extractKotlinInfixCall — `Users.id eq id1` / `a to b`: a call of the middle simple_identifier, `lhs.fn` when the left operand is a plain name, else the bare name; literal left operands emit nothing.
(&mut self, node: Node<'t>)
| 1259 | /// middle simple_identifier, `lhs.fn` when the left operand is a plain |
| 1260 | /// name, else the bare name; literal left operands emit nothing. |
| 1261 | fn extract_infix_call(&mut self, node: Node<'t>) { |
| 1262 | if self.stack.is_empty() || node.named_child_count() != 3 { |
| 1263 | return; |
| 1264 | } |
| 1265 | let (Some(lhs), Some(func)) = (node.named_child(0), node.named_child(1)) else { return }; |
| 1266 | if func.kind() != "simple_identifier" || is_literal_receiver(lhs.kind()) { |
| 1267 | return; |
| 1268 | } |
| 1269 | let caller = self.top_row(); |
| 1270 | let name = self.text(func); |
| 1271 | let receiver = if lhs.kind() == "simple_identifier" { self.text(lhs) } else { "" }; |
| 1272 | let callee = if !receiver.is_empty() && receiver != "this" && receiver != "super" { |
| 1273 | format!("{receiver}.{name}") |
| 1274 | } else { |
| 1275 | name.to_string() |
| 1276 | }; |
| 1277 | self.push_ref_at(caller, &callee, edge_kind_index("calls").unwrap(), node); |
| 1278 | } |
| 1279 | |
| 1280 | fn extract_call(&mut self, node: Node<'t>) { |
| 1281 | if self.stack.is_empty() { |
no test coverage detected