diff --git a/src/ast/expr.rs b/src/ast/expr.rs index b7cb4a52..3edfddc6 100644 --- a/src/ast/expr.rs +++ b/src/ast/expr.rs @@ -646,15 +646,14 @@ impl Expr { | Self::Variable(_, pos, _) | Self::Stack(_, pos) | Self::FnCall(_, pos) + | Self::Index(_, _, pos) | Self::Custom(_, pos) | Self::InterpolatedString(_, pos) => *pos, Self::Property(x) => (x.2).1, Self::Stmt(x) => x.position(), - Self::And(x, _) | Self::Or(x, _) | Self::Dot(x, _, _) | Self::Index(x, _, _) => { - x.lhs.position() - } + Self::And(x, _) | Self::Or(x, _) | Self::Dot(x, _, _) => x.lhs.position(), } } /// Override the [position][Position] of the expression.