pub struct LemonMint { /* private fields */ }
Expand description
The compiled parser that can be saved to a rust file. Use LemonMintBuilder
to build it.
Implementations§
Source§impl LemonMint
impl LemonMint
Sourcepub fn gen_rust<W>(&self, out: &mut W) -> Result<()>where
W: Write,
pub fn gen_rust<W>(&self, out: &mut W) -> Result<()>where
W: Write,
Generate Rust source code for the parser
Sourcepub fn gen_log<W>(
&self,
out: &mut W,
basisflag: bool,
show_precedence_conflict: bool,
) -> Result<()>where
W: Write,
pub fn gen_log<W>(
&self,
out: &mut W,
basisflag: bool,
show_precedence_conflict: bool,
) -> Result<()>where
W: Write,
Generate a report of the parser generated. (the “y.output” file)
basisflag
- Print only the basis in reportshow_precedence_conflict
- Show conflicts resolved by precedence rules
pub fn gen_y<W>(&self, out: &mut W) -> Result<()>where
W: Write,
Trait Implementations§
Source§impl TryFrom<LemonMintBuilder> for LemonMint
impl TryFrom<LemonMintBuilder> for LemonMint
Source§type Error = LemonMintError
type Error = LemonMintError
The type returned in the event of a conversion error.
Source§fn try_from(builder: LemonMintBuilder) -> Result<Self, LemonMintError>
fn try_from(builder: LemonMintBuilder) -> Result<Self, LemonMintError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for LemonMint
impl !RefUnwindSafe for LemonMint
impl !Send for LemonMint
impl !Sync for LemonMint
impl Unpin for LemonMint
impl !UnwindSafe for LemonMint
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