(&mut self, n: Node<'t>, decorated_row: u32)
| 1581 | } |
| 1582 | |
| 1583 | fn consider_decorator(&mut self, n: Node<'t>, decorated_row: u32) { |
| 1584 | if !matches!(n.kind(), "decorator" | "annotation" | "marker_annotation" | "attribute") { |
| 1585 | return; |
| 1586 | } |
| 1587 | let mut target: Option<Node> = None; |
| 1588 | for child in n.named_children(&mut n.walk()) { |
| 1589 | if child.kind() == "call_expression" { |
| 1590 | target = child.child_by_field_name("function").or_else(|| child.named_child(0)); |
| 1591 | if target.is_some() { |
| 1592 | break; |
| 1593 | } |
| 1594 | } |
| 1595 | if matches!( |
| 1596 | child.kind(), |
| 1597 | "identifier" | "member_expression" | "scoped_identifier" | "navigation_expression" |
| 1598 | | "user_type" | "type_identifier" |
| 1599 | ) { |
| 1600 | target = Some(child); |
| 1601 | break; |
| 1602 | } |
| 1603 | } |
| 1604 | let Some(target) = target else { return }; |
| 1605 | let name = strip_generic_and_qualifier(self.text(target)); |
| 1606 | if name.is_empty() { |
| 1607 | return; |
| 1608 | } |
| 1609 | self.push_ref_at(decorated_row, &name, edge_kind_index("decorates").unwrap(), n); |
| 1610 | } |
| 1611 | |
| 1612 | // --- function-as-value refs (KOTLIN_SPEC, function-ref.ts:240) ------------------ |
| 1613 |
no test coverage detected