diff --git a/src/parser/ast/mod.rs b/src/parser/ast/mod.rs index 8039071..0119683 100644 --- a/src/parser/ast/mod.rs +++ b/src/parser/ast/mod.rs @@ -496,10 +496,6 @@ pub enum Expression { YieldFrom { value: Box, }, - Negate { - span: Span, - value: Box, - }, UnaryPlus { span: Span, value: Box, diff --git a/src/parser/expressions.rs b/src/parser/expressions.rs index 39b5262..127c66a 100644 --- a/src/parser/expressions.rs +++ b/src/parser/expressions.rs @@ -1417,10 +1417,7 @@ fn interpolated_string_part(state: &mut State) -> ParseResult let span = state.current.span; state.next(); if let TokenKind::LiteralInteger(i) = &state.current.kind { - let e = Expression::Negate { - span, - value: Box::new(Expression::LiteralInteger { i: i.clone() }), - }; + let e = Expression::ArithmeticOperation(ArithmeticOperation::Negation { span, right: Box::new(Expression::LiteralInteger { i: i.clone() }) }); state.next(); e } else {