pub struct Parser { /* private fields */ }Implementations§
Source§impl Parser
impl Parser
pub fn new(tokens: Vec<Token>) -> Self
pub fn parse_program(self) -> Result<Program, ParserError>
Sourcepub fn parse_source(source: &str) -> Result<Program, ParserError>
pub fn parse_source(source: &str) -> Result<Program, ParserError>
Lex and parse source into a program in one step.
pub fn parse(&mut self) -> Result<Vec<Stmt>, ParserError>
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