Refine position display of indexing.
This commit is contained in:
parent
d8a6b93f43
commit
c79f1e44e4
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user