pub struct Parser<'q, 'd> { /* private fields */ }Expand description
Trivia tokens are buffered and flushed when starting a new node.
Implementations§
Source§impl<'q, 'd> Parser<'q, 'd>
impl<'q, 'd> Parser<'q, 'd>
Sourcepub fn builder(
source: &'q str,
source_id: SourceId,
tokens: Vec<Token>,
diagnostics: &'d mut Diagnostics,
) -> ParserBuilder<'q, 'd>
pub fn builder( source: &'q str, source_id: SourceId, tokens: Vec<Token>, diagnostics: &'d mut Diagnostics, ) -> ParserBuilder<'q, 'd>
Create a builder for Parser.
Sourcepub fn new(
source: &'q str,
source_id: SourceId,
tokens: Vec<Token>,
diagnostics: &'d mut Diagnostics,
fuel: u32,
max_depth: u32,
) -> Self
pub fn new( source: &'q str, source_id: SourceId, tokens: Vec<Token>, diagnostics: &'d mut Diagnostics, fuel: u32, max_depth: u32, ) -> Self
Create a new parser with the specified parameters.
pub fn parse(self) -> Result<ParseResult, Error>
Source§impl Parser<'_, '_>
impl Parser<'_, '_>
pub fn parse_root(&mut self)
Auto Trait Implementations§
impl<'q, 'd> !Freeze for Parser<'q, 'd>
impl<'q, 'd> !RefUnwindSafe for Parser<'q, 'd>
impl<'q, 'd> Send for Parser<'q, 'd>
impl<'q, 'd> !Sync for Parser<'q, 'd>
impl<'q, 'd> Unpin for Parser<'q, 'd>
impl<'q, 'd> !UnwindSafe for Parser<'q, 'd>
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