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>)
| 1218 | /// middle simple_identifier, `lhs.fn` when the left operand is a plain |
| 1219 | /// name, else the bare name; literal left operands emit nothing. |
| 1220 | fn extract_infix_call(&mut self, node: Node<'t>) { |
| 1221 | if self.stack.is_empty() || node.named_child_count() != 3 { |
| 1222 | return; |
| 1223 | } |
| 1224 | let (Some(lhs), Some(func)) = (node.named_child(0), node.named_child(1)) else { return }; |
| 1225 | if func.kind() != "simple_identifier" || is_literal_receiver(lhs.kind()) { |
| 1226 | return; |
| 1227 | } |
| 1228 | let caller = self.top_row(); |
| 1229 | let name = self.text(func); |
| 1230 | let receiver = if lhs.kind() == "simple_identifier" { self.text(lhs) } else { "" }; |
| 1231 | let callee = if !receiver.is_empty() && receiver != "this" && receiver != "super" { |
| 1232 | format!("{receiver}.{name}") |
| 1233 | } else { |
| 1234 | name.to_string() |
| 1235 | }; |
| 1236 | self.push_ref_at(caller, &callee, edge_kind_index("calls").unwrap(), node); |
| 1237 | } |
| 1238 | |
| 1239 | fn extract_call(&mut self, node: Node<'t>) { |
| 1240 | if self.stack.is_empty() { |
no test coverage detected