pub struct JavaScriptParser { /* private fields */ }
Expand description
JavaScript/TypeScript parser
Implementations§
Source§impl JavaScriptParser
impl JavaScriptParser
Sourcepub fn detect_language(path: &Path) -> Language
pub fn detect_language(path: &Path) -> Language
Get the language for a file based on its extension
Sourcepub fn parse(&mut self, context: &ParseContext) -> Result<ParseResult>
pub fn parse(&mut self, context: &ParseContext) -> Result<ParseResult>
Parse a JavaScript or TypeScript file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JavaScriptParser
impl RefUnwindSafe for JavaScriptParser
impl Send for JavaScriptParser
impl Sync for JavaScriptParser
impl Unpin for JavaScriptParser
impl UnwindSafe for JavaScriptParser
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