pub struct Parser { /* private fields */ }Expand description
Parser state.
Implementations§
Source§impl Parser
impl Parser
Source§impl Parser
impl Parser
Sourcepub fn parse_decl(&mut self) -> Result<Located<Decl>, ParseError>
pub fn parse_decl(&mut self) -> Result<Located<Decl>, ParseError>
Parse a top-level declaration.
Source§impl Parser
impl Parser
Sourcepub fn parse_expr(&mut self) -> Result<Located<SurfaceExpr>, ParseError>
pub fn parse_expr(&mut self) -> Result<Located<SurfaceExpr>, ParseError>
Parse an expression (entry point, lowest precedence).
Source§impl Parser
impl Parser
Sourcepub fn parse_binders(&mut self) -> Result<Vec<Binder>, ParseError>
pub fn parse_binders(&mut self) -> Result<Vec<Binder>, ParseError>
Parse binders for lambda, forall, variable declarations.
Supports:
(x : T)– explicit{x : T}– implicit[x : T]– instance{{x : T}}– strict implicitx– simple binder without type- Multiple binder groups
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