pub struct Parser<'a> { /* private fields */ }Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
pub fn new(input: &'a str, config: &'a ParserOptions) -> Self
pub fn parse(self) -> SyntaxNode
Sourcepub fn parse_with_errors(self) -> (SyntaxNode, Vec<SyntaxError>)
pub fn parse_with_errors(self) -> (SyntaxNode, Vec<SyntaxError>)
Parse, returning the CST plus any embedded-sublanguage syntax errors (host-ranged) collected during the single pass.
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