Skip to content
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

Fix crash on class fields that don't end in a semicolon #271

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

alangpierce
Copy link
Owner

Fixes #235

The previous code always ate the next token after a class field, which was a
semicolon in all test cases so far. However, if the class field didn't end in a
semicolon, it would eat the first token of the next class body member, which
would confuse all downstream code and lead to errors.

This means we end up leaving semicolons around in class bodies where class
fields were, but this shouldn't cause problems, and it seems best to keep the
transforms simple.

Fixes #235

The previous code always ate the next token after a class field, which was a
semicolon in all test cases so far. However, if the class field didn't end in a
semicolon, it would eat the first token of the next class body member, which
would confuse all downstream code and lead to errors.

This means we end up leaving semicolons around in class bodies where class
fields were, but this shouldn't cause problems, and it seems best to keep the
transforms simple.
@alangpierce alangpierce merged commit 94e6a81 into master Jun 25, 2018
@alangpierce alangpierce deleted the fix-class-field-without-semicolon branch June 30, 2018 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant