pub struct Parser<'cmt, 's: 'cmt> { /* private fields */ }Expand description
Create a parser with some source code, then parse it.
Implementations§
Source§impl<'cmt, 's: 'cmt> Parser<'cmt, 's>
impl<'cmt, 's: 'cmt> Parser<'cmt, 's>
Sourcepub fn new(source: &'s str, syntax: Syntax) -> Self
pub fn new(source: &'s str, syntax: Syntax) -> Self
Create a parser with the given source code and specified syntax.
If you need to control more options, please use ParserBuilder.
Sourcepub fn recoverable_errors(&self) -> &[Error]
pub fn recoverable_errors(&self) -> &[Error]
Retrieve recoverable errors.
Auto Trait Implementations§
impl<'cmt, 's> Freeze for Parser<'cmt, 's>
impl<'cmt, 's> RefUnwindSafe for Parser<'cmt, 's>
impl<'cmt, 's> Send for Parser<'cmt, 's>
impl<'cmt, 's> Sync for Parser<'cmt, 's>
impl<'cmt, 's> Unpin for Parser<'cmt, 's>
impl<'cmt, 's> !UnwindSafe for Parser<'cmt, 's>
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