Parser - Removed useless clone
This commit is contained in:
parent
c0bf521b61
commit
45ed237818
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ impl Parser {
|
||||||
fn parse_unary(&mut self) -> Result<ast::ExprNode, ParserError> {
|
fn parse_unary(&mut self) -> Result<ast::ExprNode, ParserError> {
|
||||||
if let Some(operator) = self.expect(&[TokenType::Bang, TokenType::Minus]) {
|
if let Some(operator) = self.expect(&[TokenType::Bang, TokenType::Minus]) {
|
||||||
Ok(ast::ExprNode::Unary {
|
Ok(ast::ExprNode::Unary {
|
||||||
operator: operator.clone(),
|
operator,
|
||||||
right: Box::new(self.parse_unary()?),
|
right: Box::new(self.parse_unary()?),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue