pub struct Parser<'a> { /* private fields */ }Expand description
Create a parser with some source code, then parse it.
Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn new(allocator: &'a Allocator, source: &'a str, syntax: Syntax) -> Self
pub fn new(allocator: &'a Allocator, source: &'a 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<'a> !RefUnwindSafe for Parser<'a>
impl<'a> !Send for Parser<'a>
impl<'a> !Sync for Parser<'a>
impl<'a> !UnwindSafe for Parser<'a>
impl<'a> Freeze for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnsafeUnpin for Parser<'a>
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