pub struct Parser { /* private fields */ }Expand description
Main parser that orchestrates multi-language parsing.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn parse_file(
&self,
path: &Path,
content: &str,
) -> AcbResult<Vec<RawCodeUnit>>
pub fn parse_file( &self, path: &Path, content: &str, ) -> AcbResult<Vec<RawCodeUnit>>
Parse a single file given its path and content.
Sourcepub fn parse_directory(
&self,
root: &Path,
options: &ParseOptions,
) -> AcbResult<ParseResult>
pub fn parse_directory( &self, root: &Path, options: &ParseOptions, ) -> AcbResult<ParseResult>
Parse all matching files in a directory tree.
Sourcepub fn should_parse(&self, path: &Path) -> bool
pub fn should_parse(&self, path: &Path) -> bool
Returns true if a file should be parsed based on language filters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl !RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl !UnwindSafe for Parser
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