Parser - Cleaning up after field removal

This commit is contained in:
Emmanuel BENOîT 2023-01-02 21:40:30 +01:00
parent 46389d2962
commit 36c842d7ab

View file

@ -683,7 +683,7 @@ impl Parser {
Ok(ast::ExprNode::Grouping {
expression: Box::new(expr),
})
} else if let Some(token) = self.expect(&[TokenType::Fun]) {
} else if self.expect(&[TokenType::Fun]).is_some() {
let (params, body) = self.parse_function_info(FunctionKind::Lambda)?;
Ok(ast::ExprNode::Lambda { params, body })
} else if let Some(token) =