feat(ast): add AstKind::ident_reference_is_assigned_to_in_parent method#12597
Merged
graphite-app[bot] merged 1 commit intomainfrom Jul 30, 2025
Conversation
This was referenced Jul 29, 2025
Member
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #12597 will not alter performanceComparing Summary
|
Member
Merge activity
|
…thod (#12597) 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`.
3279c53 to
106f56f
Compare
2460433 to
26249cf
Compare
Base automatically changed from
07-29-feat_ast_add_memberexpressionkind_is_assigned_to_in_parent_method
to
main
July 30, 2025 01:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Similar to #12596.
Add a method
AstKind::ident_reference_is_assigned_to_in_parent. Given anAstKindrepresenting anIdentifierReference, and anAstKindrepresenting its parent, this method determines whether the identifier is being assigned to.Covers all possible positions where an
IdentifierReferencegets assigned to -x = value,x++,[...x] = arretc.Note: This method is slightly different to
MemberExpressionKind::is_assigned_to_in_parent- it includes additional match arm forAssignmentTargetPropertyIdentifieras parent. This can't be parent of aMemberExpression, but can be the parent of anIdentifierReference.