Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3189,22 +3189,22 @@ inherit .containing_class_value
;; ##### Member Expressions

(member_expression
(_)@object . (_)@property)@member_expr
{

node member_push
node property_push
object:(_)@object
property:(_)@property
)@member_expr {
node member_push
node property_push

; scopes flow into object then back out
edge @object.before_scope -> @member_expr.before_scope
edge @member_expr.after_scope -> @object.after_scope

; value is a member projection on the value of the object ie. a push then push dot
attr (member_push) push_symbol = "GUARD:MEMBER"
attr (property_push) node_reference = @property
edge property_push -> member_push
edge @member_expr.value -> property_push
edge member_push -> @object.value
attr (member_push) push_symbol = "GUARD:MEMBER"
attr (property_push) node_reference = @property
edge property_push -> member_push
edge @member_expr.value -> property_push
edge member_push -> @object.value

; (member_expression) nodes can occur in patterns
node @member_expr.covalue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ let x = 1;
// Flow around

/**/ x;
// ^ defined: 1
// ^ defined: 1

// Optional chain

/**/ x?.foo
// ^ defined: 1
Loading