pub struct Parser<R: BufRead> { /* private fields */ }Implementations§
Source§impl<R: BufRead> Parser<R>
impl<R: BufRead> Parser<R>
pub fn new(scanner: Scanner<R>) -> Parser<R>
pub fn eof(&mut self) -> bool
pub fn expr(&mut self) -> Result<Expr, Error>
pub fn stmt(&mut self) -> Result<Stmt, Error>
pub fn block(&mut self) -> Result<Block, Error>
pub fn fn_expr(&mut self) -> Result<Func, Error>
pub fn def(&mut self) -> Result<Def, Error>
pub fn program(&mut self) -> Result<Program, Error>
Auto Trait Implementations§
impl<R> Freeze for Parser<R>where
R: Freeze,
impl<R> !RefUnwindSafe for Parser<R>
impl<R> Send for Parser<R>where
R: Send,
impl<R> Sync for Parser<R>where
R: Sync,
impl<R> Unpin for Parser<R>where
R: Unpin,
impl<R> !UnwindSafe for Parser<R>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more