mirror of
https://github.com/danog/parser.git
synced 2024-11-26 20:04:57 +01:00
fix: replace missed usage of Negate with no ops expression
This commit is contained in:
parent
68d2ec6702
commit
91faaafdf9
@ -496,10 +496,6 @@ pub enum Expression {
|
||||
YieldFrom {
|
||||
value: Box<Self>,
|
||||
},
|
||||
Negate {
|
||||
span: Span,
|
||||
value: Box<Self>,
|
||||
},
|
||||
UnaryPlus {
|
||||
span: Span,
|
||||
value: Box<Self>,
|
||||
|
@ -1417,10 +1417,7 @@ fn interpolated_string_part(state: &mut State) -> ParseResult<Option<StringPart>
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user