You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #12596.
Add a method `AstKind::ident_reference_is_assigned_to_in_parent`. Given an `AstKind` representing an `IdentifierReference`, and an `AstKind` representing its parent, this method determines whether the identifier is being assigned to.
Covers all possible positions where an `IdentifierReference` gets assigned to - `x = value`, `x++`, `[...x] = arr` etc.
Note: This method is slightly different to `MemberExpressionKind::is_assigned_to_in_parent` - it includes additional match arm for `AssignmentTargetPropertyIdentifier` as parent. This can't be parent of a `MemberExpression`, but *can* be the parent of an `IdentifierReference`.
0 commit comments