fn parse_letrec(&mut self) -> Result<Term> {
        self.consume_token(Token::Letrec)?;
        let var = self.consume_identifier()?;

        let vty = if let Token::Colon = self.peek_token()? {
            self.consume_token(Token::Colon)?;
            Some(self.parse_type()?)
        } else {
            None
        };

        self.consume_token(Token::Equals)?;
        let term1 = self.parse_term()?;
        self.consume_token(Token::In)?;
        let term2 = self.parse_term()?;

        Ok(Term::Letrec(var, vty, Box::new(term1), Box::new(term2)))
    }
// letrec : LETREC ident : type = term IN term
letrec : LETREC ident : type = term IN term
letrec : LETREC ident : type = term IN term
fn parse_letrec(&mut self) -> Result<Term> {
        self.consume_token(Token::Letrec)?;
        let var = self.consume_identifier()?;
        let vty = if let Token::Colon = self.peek_token()? {
            self.consume_token(Token::Colon)?;
            Some(self.parse_type()?)
        } else {
            None
        };
        self.consume_token(Token::Equals)?;
        let term1 = self.parse_term()?;
        self.consume_token(Token::In)?;
        let term2 = self.parse_term()?;
        Ok(Term::Letrec(var, vty, Box::new(term1), Box::new(term2)))
    }
fn parse_letrec ( & mut self ) -> Result < Term > { self . consume_token ( Token :: Letrec ) ? ; let var = self . consume_identifier ( ) ? ; let vty = if let Token :: Colon = self . peek_token ( ) ? { self . consume_token ( Token :: Colon ) ? ; Some ( self . parse_type ( ) ? ) } else { None } ; self . consume_token ( Token :: Equals ) ? ; let term1 = self . parse_term ( ) ? ; self . consume_token ( Token :: In ) ? ; let term2 = self . parse_term ( ) ? ; Ok ( Term :: Letrec ( var , vty , Box :: new ( term1 ) , Box :: new ( term2 ) ) ) }
letrec : LETREC ident : type = term IN term
letrec : LETREC ident : type = term IN term
&mut self
&mut self