Struct erg_parser::parse::Parser
source · pub struct Parser { /* private fields */ }
Expand description
Perform recursive descent parsing.
level
is raised by 1 by debug_call_info!
in each analysis method and lowered by 1 when leaving (.map_err
is called to lower the level).
To enhance error descriptions, the parsing process will continue as long as it’s not fatal.
Implementations§
source§impl Parser
impl Parser
pub fn parse(&mut self) -> Result<CompleteArtifact, IncompleteArtifact>
source§impl Parser
impl Parser
pub fn validate_const_expr(expr: Expr) -> Result<ConstExpr, ParseError>
pub fn validate_const_block(block: Block) -> Result<ConstBlock, ParseError>
pub fn expr_to_type_spec(rhs: Expr) -> Result<TypeSpec, ParseError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin 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