-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash on class fields that don't end in a semicolon (#271)
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.
- Loading branch information
1 parent
6c3e80f
commit 94e6a81
Showing
5 changed files
with
70 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,8 +54,8 @@ describe("transform flow", () => { | |
`, | ||
`"use strict"; | ||
class C { | ||
; | ||
; | ||
} | ||
`, | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters