Extract a class declaration
(
&self,
node: &Node,
source: &str,
file_path: &str,
exported: bool,
)
| 748 | |
| 749 | /// Extract a class declaration |
| 750 | fn extract_class( |
| 751 | &self, |
| 752 | node: &Node, |
| 753 | source: &str, |
| 754 | file_path: &str, |
| 755 | exported: bool, |
| 756 | ) -> Option<Entity> { |
| 757 | let name_node = node.child_by_field_name("name")?; |
| 758 | let name = self.node_text(&name_node, source)?; |
| 759 | |
| 760 | let signature = self.build_class_signature(node, source); |
| 761 | |
| 762 | Some( |
| 763 | Entity::new( |
| 764 | name, |
| 765 | EntityKind::Class, |
| 766 | file_path, |
| 767 | node.start_position().row as u32 + 1, |
| 768 | node.end_position().row as u32 + 1, |
| 769 | ) |
| 770 | .with_column(node.start_position().column as u32) |
| 771 | .with_signature(signature) |
| 772 | .with_exported(exported), |
| 773 | ) |
| 774 | } |
| 775 | |
| 776 | /// Extract class methods |
| 777 | fn extract_class_members( |
no test coverage detected