Struct Parser

Source
pub struct Parser { /* private fields */ }

Implementations§

Source§

impl Parser

Source

pub fn parse_primary_expr(&mut self, ctx: &Context) -> Result<ExprNode>

Source

pub fn parse_fact_expr(&mut self, ctx: &Context) -> Result<ExprNode>

Source

pub fn parse_term(&mut self, ctx: &Context) -> Result<ExprNode>

Source

pub fn parse_expr0(&mut self, ctx: &Context) -> Result<ExprNode>

Source

pub fn parse_expr(&mut self, ctx: &Context) -> Result<ExprNode>

Source

pub fn parse_expr1(&mut self, ctx: &Context) -> Result<ExprNode>

Source

pub fn parse_chain_expr(&mut self, ctx: &Context) -> Result<ExprNode>

Source§

impl Parser

Source

pub fn parse_identifier(&mut self) -> Result<(String, Position)>

Source

pub fn parse_keyword(&mut self, keyword: &str) -> Result<Position>

Source

pub fn parse_special_token(&mut self, token: Token) -> Result<Position>

Source

pub fn next_is(&mut self, token: Token) -> bool

Source§

impl Parser

Source

pub fn parse_simple_type(&mut self) -> Result<Type>

Source

pub fn parse_type(&mut self) -> Result<Type>

Source§

impl Parser

Source

pub fn parse_match_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_if_let_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_if_const_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_var_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_val_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_while_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_if_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_for_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source

pub fn parse_stmt(&mut self, ctx: &Context) -> Result<StmtNode>

Source§

impl Parser

Source

pub fn new(lexer: Lexer, ctx: &Context) -> Self

Source

pub fn parse_module(&mut self, ctx: &Context) -> Result<()>

Source

pub fn parse(&mut self, ctx: &Context) -> Result<DefaultKey>

Auto Trait Implementations§

§

impl Freeze for Parser

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.