fn parse_fun_intro(
        &mut self,
        start_token: Token<'file>,
    ) -> Result<Term<'file>, Diagnostic<FileSpan>> {
        let params = self.parse_intro_params()?;
        if params.is_empty() {
            return Err(
                Diagnostic::new_error("expected at least one parameters").with_label(
                    Label::new_primary(start_token.span())
                        .with_message("at least one parameter was expected after this keyword"),
                ),
            );
        }
        self.expect_match(TokenKind::RFatArrow)?;
        let body = self.parse_term(Prec(0))?;
        let span = FileSpan::merge(start_token.span(), body.span());

        Ok(Term::FunIntro(span, params, Box::new(body)))
    }
/// Parse the trailing part of a function introduction.
///
/// ```text
/// fun-intro ::= intro-param+ "=>" term(0)
/// ```
Parse the trailing part of a function introduction.
Parse the trailing part of a function introduction .
fn parse_fun_intro(
        &mut self,
        start_token: Token<'file>,
    ) -> Result<Term<'file>, Diagnostic<FileSpan>> {
        let params = self.parse_intro_params()?;
        if params.is_empty() {
            return Err(
                Diagnostic::new_error("expected at least one parameters").with_label(
                    Label::new_primary(start_token.span())
                        .with_message("at least one parameter was expected after this keyword"),
                ),
            );
        }
        self.expect_match(TokenKind::RFatArrow)?;
        let body = self.parse_term(Prec(0))?;
        let span = FileSpan::merge(start_token.span(), body.span());
        Ok(Term::FunIntro(span, params, Box::new(body)))
    }
fn parse_fun_intro ( & mut self , start_token : Token < ' file > , ) -> Result < Term < ' file > , Diagnostic < FileSpan > > { let params = self . parse_intro_params ( ) ? ; if params . is_empty ( ) { return Err ( Diagnostic :: new_error ( " " ) . with_label ( Label :: new_primary ( start_token . span ( ) ) . with_message ( " " ) , ) , ) ; } self . expect_match ( TokenKind :: RFatArrow ) ? ; let body = self . parse_term ( Prec ( 0 ) ) ? ; let span = FileSpan :: merge ( start_token . span ( ) , body . span ( ) ) ; Ok ( Term :: FunIntro ( span , params , Box :: new ( body ) ) ) }
Parse the trailing part of a function introduction.
Parse the trailing part of a function introduction .
&mut self
start_token
Token<'file>
&mut self
start_token
Token<'file>