10000 Use TSX parser instead of Typescript parser for JavaScript and JSX by maxbrunsfeld · Pull Request #229 · github/semantic · GitHub
[go: up one dir, main page]

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

Use TSX parser instead of Typescript parser for JavaScript and JSX #229

Merged
merged 5 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Regenerate jsx corpus files
  • Loading branch information
maxbrunsfeld committed Aug 21, 2019
commit 5491001cf77590d17e82f85d52a383e33ff435ac
4 changes: 3 additions & 1 deletion test/fixtures/tsx/corpus/jsx-elements.diffA-B.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
(JsxElement
(JsxOpeningElement
(Identifier)
(Empty)
Copy link
Contributor Author
@maxbrunsfeld maxbrunsfeld Aug 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JsxOpeningElement terms now have an optional TypeArguments child. We based this off the way that type arguments are handled in the New node.

{+(JsxAttribute
{+(Identifier)+}
{+(JsxExpression
Expand All @@ -31,7 +32,8 @@
{-(JsxOpeningElement
{-(NestedIdentifier
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(Identifier)-})-}
{-(Empty)-})-}
{-(JsxClosingElement
{-(NestedIdentifier
{-(Identifier)-}
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/tsx/corpus/jsx-elements.diffB-A.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
(JsxElement
(JsxOpeningElement
(Identifier)
(Empty)
{+(JsxExpression
{+(Call
{+(Identifier)+}
Expand All @@ -31,7 +32,8 @@
{+(JsxOpeningElement
{+(NestedIdentifier
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(Identifier)+})+}
{+(Empty)+})+}
{+(JsxClosingElement
{+(NestedIdentifier
{+(Identifier)+}
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/tsx/corpus/jsx-elements.parseA.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
(JsxElement
(JsxOpeningElement
(Identifier)
(Empty)
(JsxExpression
(Call
(Identifier)
Expand All @@ -25,7 +26,8 @@
(JsxOpeningElement
(NestedIdentifier
(Identifier)
(Identifier)))
(Identifier))
(Empty))
(JsxClosingElement
(NestedIdentifier
(Identifier)
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/tsx/corpus/jsx-elements.parseB.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
(JsxElement
(JsxOpeningElement
(Identifier)
(Empty)
(JsxAttribute
(Identifier)
(JsxExpression
Expand Down
0