/// Parses a user-defined function.
Parses a user-defined function.
Parses a user - defined function .
fn parse_def(&mut self) -> Result<Function, &'static str> {
        // Eat 'def' keyword
        self.pos += 1;
        // Parse signature of function
        let proto = self.parse_prototype()?;
        // Parse body of function
        let body = self.parse_expr()?;
        // Return new function
        Ok(Function {
            prototype: proto,
            body: Some(body),
            is_anon: false,
        })
    }
fn parse_def ( & mut self ) -> Result < Function , & ' static str > { // Eat 'def' keyword self . pos += 1 ; // Parse signature of function let proto = self . parse_prototype ( ) ? ; // Parse body of function let body = self . parse_expr ( ) ? ; // Return new function Ok ( Function { prototype : proto , body : Some ( body ) , is_anon : false , } ) }
Parses a user-defined function.
Parses a user - defined function .
&mut self