Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow super when using optional chaining
Progress toward #461 Tech plan: https://github.com/alangpierce/sucrase/wiki/Sucrase-Optional-Chaining-and-Nullish-Coalescing-Technical-Plan To allow super, we mostly just need to skip the code transform on the first subscript. We also need to add a `.bind(this)` when transforming the second subscript, which can be determined through a relatively straightforward token scan.
- Loading branch information
1 parent
626ee5e
commit b7684f5
Showing
2 changed files
with
86 additions
and
1 deletion.
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