Skip to content

Commit 828d1ad

Browse files
authored
feat: improve tsx support (#420)
jsx tags may not always have an `identifier` as their name (e.g. they could have `foo.bar` as a name, which gets parsed as a `member_expression`)
1 parent 1660d6a commit 828d1ad

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

after/queries/jsx/matchup.scm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
(jsx_element) @scope.tag
22

33
(jsx_opening_element
4-
(identifier) @open.tag)
4+
name: (_) @open.tag)
55

66
(jsx_closing_element
7-
(identifier) @close.tag
8-
(#offset! @close.tag 0 -1 0 0))
7+
name: (_) @close.tag)
98

109
(jsx_self_closing_element
11-
name: (identifier) @open.selftag
10+
name: (_) @open.selftag
1211
"/>" @close.selftag) @scope.selftag

0 commit comments

Comments
 (0)