Skip to content

Fix incorrect emit for JSX/React #7823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2016
Merged

Fix incorrect emit for JSX/React #7823

merged 1 commit into from
Apr 5, 2016

Conversation

rbuckton
Copy link
Contributor

@rbuckton rbuckton commented Apr 5, 2016

This fixes some issues in the jsx transform and pretty printer that were causing a significant number of tests to fail revolving around JSX and React emit.

CC: @vladima, @DanielRosenwasser, @yuit

@rbuckton rbuckton added the Domain: Transforms Relates to the public transform API label Apr 5, 2016
@vladima
Copy link
Contributor

vladima commented Apr 5, 2016

does this incur any changes in test baselines?

@rbuckton
Copy link
Contributor Author

rbuckton commented Apr 5, 2016

No, it fixes the emit to match existing baselines.

@vladima
Copy link
Contributor

vladima commented Apr 5, 2016

👍

1 similar comment
@RyanCavanaugh
Copy link
Member

👍

@DanielRosenwasser
Copy link
Member

🚢 🇮🇹

@@ -528,12 +528,16 @@ const _super = (function (geti, seti) {
// JSX (non-expression)
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: should this comment be updated? Since the SyntaxKind that it will print is JsxExpression

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JsxExpression is not an expression, you can't put it in a CommaExpression for example. Rather its more like ExpressionStatement, it represents a different part of the tree that contains an expression. The fact that it inherits from Expression is a red-herring and one of the reasons I wrote this incorrectly in the first place.

@rbuckton rbuckton merged commit 6b903c7 into transforms Apr 5, 2016
@rbuckton rbuckton deleted the transforms-fixJsx branch April 5, 2016 17:53
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Transforms Relates to the public transform API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants