AST - Removed useless field from Lambda
This commit is contained in:
parent
2881eb5a61
commit
ab46d0bcef
2 changed files with 1 additions and 7 deletions
|
@ -98,8 +98,6 @@ pub enum ExprNode {
|
||||||
|
|
||||||
/// A lambda function.
|
/// A lambda function.
|
||||||
Lambda {
|
Lambda {
|
||||||
/// The `fun` token which creates the lambda.
|
|
||||||
token: Token,
|
|
||||||
params: Vec<Token>,
|
params: Vec<Token>,
|
||||||
body: Vec<StmtNode>,
|
body: Vec<StmtNode>,
|
||||||
},
|
},
|
||||||
|
|
|
@ -685,11 +685,7 @@ impl Parser {
|
||||||
})
|
})
|
||||||
} else if let Some(token) = self.expect(&[TokenType::Fun]) {
|
} else if let Some(token) = self.expect(&[TokenType::Fun]) {
|
||||||
let (params, body) = self.parse_function_info(FunctionKind::Lambda)?;
|
let (params, body) = self.parse_function_info(FunctionKind::Lambda)?;
|
||||||
Ok(ast::ExprNode::Lambda {
|
Ok(ast::ExprNode::Lambda { params, body })
|
||||||
token,
|
|
||||||
params,
|
|
||||||
body,
|
|
||||||
})
|
|
||||||
} else if let Some(token) =
|
} else if let Some(token) =
|
||||||
self.expect(&[TokenType::False, TokenType::True, TokenType::Nil])
|
self.expect(&[TokenType::False, TokenType::True, TokenType::Nil])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue