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>)
| 1176 | /// middle simple_identifier, `lhs.fn` when the left operand is a plain |
| 1177 | /// name, else the bare name; literal left operands emit nothing. |
| 1178 | fn extract_infix_call(&mut self, node: Node<'t>) { |
| 1179 | if self.stack.is_empty() || node.named_child_count() != 3 { |
| 1180 | return; |
| 1181 | } |
| 1182 | let (Some(lhs), Some(func)) = (node.named_child(0), node.named_child(1)) else { return }; |
| 1183 | if func.kind() != "simple_identifier" || is_literal_receiver(lhs.kind()) { |
| 1184 | return; |
| 1185 | } |
| 1186 | let caller = self.top_row(); |
| 1187 | let name = self.text(func); |
| 1188 | let receiver = if lhs.kind() == "simple_identifier" { self.text(lhs) } else { "" }; |
| 1189 | let callee = if !receiver.is_empty() && receiver != "this" && receiver != "super" { |
| 1190 | format!("{receiver}.{name}") |
| 1191 | } else { |
| 1192 | name.to_string() |
| 1193 | }; |
| 1194 | self.push_ref_at(caller, &callee, edge_kind_index("calls").unwrap(), node); |
| 1195 | } |
| 1196 | |
| 1197 | fn extract_call(&mut self, node: Node<'t>) { |
| 1198 | if self.stack.is_empty() { |
no test coverage detected