mirror of
https://github.com/danog/parser.git
synced 2024-11-30 04:29:13 +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 {
|
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>,
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user