Extract a class declaration
(
&self,
node: &Node,
source: &str,
file_path: &str,
exported: bool,
)
| 765 | |
| 766 | /// Extract a class declaration |
| 767 | fn extract_class( |
| 768 | &self, |
| 769 | node: &Node, |
| 770 | source: &str, |
| 771 | file_path: &str, |
| 772 | exported: bool, |
| 773 | ) -> Option<Entity> { |
| 774 | let name_node = node.child_by_field_name("name")?; |
| 775 | let name = self.node_text(&name_node, source)?; |
| 776 | |
| 777 | let signature = self.build_class_signature(node, source); |
| 778 | |
| 779 | Some( |
| 780 | Entity::new( |
| 781 | name, |
| 782 | EntityKind::Class, |
| 783 | file_path, |
| 784 | node.start_position().row as u32 + 1, |
| 785 | node.end_position().row as u32 + 1, |
| 786 | ) |
| 787 | .with_column(node.start_position().column as u32) |
| 788 | .with_signature(signature) |
| 789 | .with_exported(exported), |
| 790 | ) |
| 791 | } |
| 792 | |
| 793 | /// Extract class methods |
| 794 | fn extract_class_members( |
no test coverage detected