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

Commit b61bb84

Browse files
authored
Merge pull request #399 from github/jsx-namespace-names
JSX namespace names
2 parents 4d8f086 + 397a9c9 commit b61bb84

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3711,6 +3711,15 @@ inherit .containing_class_value
37113711

37123712
}
37133713

3714+
(jsx_namespace_name (_) @lhs (_) @rhs)@name {
3715+
node @name.before_scope
3716+
node @name.after_scope
3717+
3718+
edge @lhs.before_scope -> @name.before_scope
3719+
edge @rhs.before_scope -> @lhs.after_scope
3720+
edge @name.after_scope -> @name.before_scope
3721+
}
3722+
37143723
(jsx_self_closing_element
37153724
name:(_)@element_name)@jsx_self_closing_element {
37163725

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,6 @@ class { };
9999
{garply}
100100
{ }
101101
{/**/x}
102-
</foo>
102+
</foo>;
103+
<Foo:Bar />;
104+
<Foo:Bar></Foo:Bar>;

0 commit comments

Comments
 (0)