fix: replace missed usage of Negate with no ops expression

This commit is contained in:
Ryan Chandler 2022-12-09 22:37:57 +00:00
parent 68d2ec6702
commit 91faaafdf9
No known key found for this signature in database
GPG Key ID: F113BCADDB3B0CCA
2 changed files with 1 additions and 8 deletions

View File

@ -496,10 +496,6 @@ pub enum Expression {
YieldFrom { YieldFrom {
value: Box<Self>, value: Box<Self>,
}, },
Negate {
span: Span,
value: Box<Self>,
},
UnaryPlus { UnaryPlus {
span: Span, span: Span,
value: Box<Self>, value: Box<Self>,

View File

@ -1417,10 +1417,7 @@ fn interpolated_string_part(state: &mut State) -> ParseResult<Option<StringPart>
let span = state.current.span; let span = state.current.span;
state.next(); state.next();
if let TokenKind::LiteralInteger(i) = &state.current.kind { if let TokenKind::LiteralInteger(i) = &state.current.kind {
let e = Expression::Negate { let e = Expression::ArithmeticOperation(ArithmeticOperation::Negation { span, right: Box::new(Expression::LiteralInteger { i: i.clone() }) });
span,
value: Box::new(Expression::LiteralInteger { i: i.clone() }),
};
state.next(); state.next();
e e
} else { } else {