pub struct SwiftParser { /* private fields */ }Expand description
Swift language parser
Implementations§
Source§impl SwiftParser
impl SwiftParser
Sourcepub fn with_config(config: ParserConfig) -> Self
pub fn with_config(config: ParserConfig) -> Self
Create a new Swift parser with custom configuration
Trait Implementations§
Source§impl CodeParser for SwiftParser
impl CodeParser for SwiftParser
Source§fn language(&self) -> &str
fn language(&self) -> &str
Returns the language identifier (lowercase, e.g., “python”, “rust”)
Source§fn file_extensions(&self) -> &[&str]
fn file_extensions(&self) -> &[&str]
Returns supported file extensions (e.g., [“.py”, “.pyw”])
Source§fn can_parse(&self, path: &Path) -> bool
fn can_parse(&self, path: &Path) -> bool
Check if this parser can handle the given file Read more
Source§fn parse_file(
&self,
path: &Path,
graph: &mut CodeGraph,
) -> Result<FileInfo, ParserError>
fn parse_file( &self, path: &Path, graph: &mut CodeGraph, ) -> Result<FileInfo, ParserError>
Parse a single file and insert entities/relationships into the graph Read more
Source§fn parse_source(
&self,
source: &str,
file_path: &Path,
graph: &mut CodeGraph,
) -> Result<FileInfo, ParserError>
fn parse_source( &self, source: &str, file_path: &Path, graph: &mut CodeGraph, ) -> Result<FileInfo, ParserError>
Parse source code string and insert into graph Read more
Source§fn config(&self) -> &ParserConfig
fn config(&self) -> &ParserConfig
Get parser configuration
Source§fn metrics(&self) -> ParserMetrics
fn metrics(&self) -> ParserMetrics
Get accumulated metrics Read more
Source§fn reset_metrics(&mut self)
fn reset_metrics(&mut self)
Reset metrics Read more
Source§fn parse_files(
&self,
paths: &[PathBuf],
graph: &mut CodeGraph,
) -> Result<ProjectInfo, ParserError>
fn parse_files( &self, paths: &[PathBuf], graph: &mut CodeGraph, ) -> Result<ProjectInfo, ParserError>
Parse multiple files (can be overridden for parallel parsing) Read more
Source§fn parse_directory(
&self,
dir: &Path,
graph: &mut CodeGraph,
) -> Result<ProjectInfo, ParserError>
fn parse_directory( &self, dir: &Path, graph: &mut CodeGraph, ) -> Result<ProjectInfo, ParserError>
Parse a directory recursively Read more
Source§fn discover_files(&self, dir: &Path) -> Result<Vec<PathBuf>, ParserError>
fn discover_files(&self, dir: &Path) -> Result<Vec<PathBuf>, ParserError>
Discover parseable files in a directory Read more
Auto Trait Implementations§
impl !Freeze for SwiftParser
impl RefUnwindSafe for SwiftParser
impl Send for SwiftParser
impl Sync for SwiftParser
impl Unpin for SwiftParser
impl UnwindSafe for SwiftParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more