Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit e9646f1

Browse files
authored
Merge pull request #396 from github/comments-in-computed-property-names
Comments in computed property names
2 parents b5ea65b + 33cce6d commit e9646f1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

languages/tree-sitter-stack-graphs-javascript/src/stack-graphs.tsg

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,10 +2591,13 @@ inherit .containing_class_value
25912591

25922592
; pairs
25932593

2594-
(computed_property_name (_)@expr)@computed_property_name {
2595-
2594+
(computed_property_name)@computed_property_name {
25962595
node @computed_property_name.after_scope
25972596
node @computed_property_name.before_scope
2597+
}
2598+
2599+
(computed_property_name (_)@expr)@computed_property_name {
2600+
25982601
edge @expr.before_scope -> @computed_property_name.before_scope
25992602
edge @computed_property_name.after_scope -> @expr.after_scope
26002603

languages/tree-sitter-stack-graphs-javascript/test/base_syntax.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function foo(undefined) { }
1313
function* foo() { }
1414
class Foo {
1515
#x = null;
16+
get [/**/ foo]() {}
1617
static {}
1718
}
1819
@Foo class Bar { }

0 commit comments

Comments
 (0)