pub struct Parser { /* private fields */ }Implementations§
Source§impl Parser
impl Parser
pub fn new(tokens: Vec<SpannedToken>) -> Self
Sourcepub fn parse_program_recovering(&mut self) -> ParseOutput
pub fn parse_program_recovering(&mut self) -> ParseOutput
Parse the full program, recovering from errors at statement boundaries.
Returns a ParseOutput containing both the partial AST and any errors.
Sourcepub fn parse_program(&mut self) -> Result<Program, IonError>
pub fn parse_program(&mut self) -> Result<Program, IonError>
Parse the full program, returning an error if any parse errors occurred.
For multi-error reporting, use parse_program_recovering instead.
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl UnwindSafe for Parser
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