[−][src]Trait libslide::parser::Parser
Associated Types
type Expr
Required methods
fn input(&mut self) -> &mut PeekIter<Token>ⓘ
fn parse(&mut self) -> T
fn parse_float(&mut self, f: f64, span: Span) -> Self::Expr
fn parse_variable(&mut self, name: String, span: Span) -> Self::Expr
fn parse_var_pattern(&mut self, name: String, span: Span) -> Self::Expr
fn parse_const_pattern(&mut self, name: String, span: Span) -> Self::Expr
fn parse_any_pattern(&mut self, name: String, span: Span) -> Self::Expr
fn push_diag(&mut self, diagnostic: Diagnostic)
fn has_stmt_break(&mut self) -> bool
Provided methods
fn parse_open_paren(&mut self, open: Token) -> Self::Expr
fn parse_open_bracket(&mut self, open: Token) -> Self::Expr
fn done(&mut self) -> bool
fn expr(&mut self) -> Self::Expr
fn peek(&mut self) -> &Token
fn next(&mut self) -> Token
fn add_sub_term(&mut self) -> Self::Expr
fn mul_divide_mod_term(&mut self) -> Self::Expr
fn exp_term(&mut self) -> Self::Expr
fn num_term(&mut self) -> Self::Expr
fn extra_tokens_diag(
&mut self,
additional_diags: impl Fn(Diagnostic, Span) -> Diagnostic
)
&mut self,
additional_diags: impl Fn(Diagnostic, Span) -> Diagnostic
)
Creates diagnostics for extra tokens following a primary item. All remaining tokens will be consumed in the construction of the diagnostic.
additional_diags
applies additional diagnostic messages to the extra tokens diagnostic,
if one is produced.
Implementors
impl Parser<RcExprPat> for ExpressionPatternParser
[src]
type Expr = RcExprPat
fn input(&mut self) -> &mut PeekIter<Token>ⓘ
[src]
fn push_diag(&mut self, diagnostic: Diagnostic)
[src]
fn parse(&mut self) -> RcExprPat
[src]
fn parse_float(&mut self, f: f64, span: Span) -> Self::Expr
[src]
fn parse_variable(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn parse_var_pattern(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn parse_const_pattern(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn parse_any_pattern(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn has_stmt_break(&mut self) -> bool
[src]
impl<'a> Parser<StmtList> for ExpressionParser<'a>
[src]
type Expr = RcExpr
fn input(&mut self) -> &mut PeekIter<Token>ⓘ
[src]
fn push_diag(&mut self, diagnostic: Diagnostic)
[src]
fn parse(&mut self) -> StmtList
[src]
fn parse_float(&mut self, f: f64, span: Span) -> Self::Expr
[src]
fn parse_variable(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn parse_var_pattern(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn parse_const_pattern(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn parse_any_pattern(&mut self, name: String, span: Span) -> Self::Expr
[src]
fn has_stmt_break(&mut self) -> bool
[src]
Do we have another statement (on a newline)?