Create a new TSX extractor (TypeScript with JSX)
()
| 33 | |
| 34 | /// Create a new TSX extractor (TypeScript with JSX) |
| 35 | pub fn new_tsx() -> Self { |
| 36 | let mut parser = Parser::new(); |
| 37 | parser |
| 38 | .set_language(&tree_sitter_typescript::LANGUAGE_TSX.into()) |
| 39 | .expect("Failed to load TSX grammar"); |
| 40 | Self { parser } |
| 41 | } |
| 42 | |
| 43 | /// Parse source code and extract all entities |
| 44 | pub fn extract(&mut self, source: &str, file_path: &str) -> Vec<Entity> { |
nothing calls this directly
no outgoing calls
no test coverage detected