-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TS support to @babel/parser's Scope (#9766)
* [parser] Allow plugins to extend ScopeHandler * Directly extend Scope * Don't use new.target to get the ScopeHandler * [parser] Add TS enum support to the Scope * Remove duplicated options in tests * Fix * Fix flow * Rename tests * Add tests * Full typescript support in scope * Remove BIND_SIMPLE_CATCH SCOPE_SIMPLE_CATCH was used instead * Export TS types * Register function declarations * Fix body-less functions and namespaces 1) Move this.scope.exit() for functions from parseFunctionBody to the callers. Otherwise the scope of body-less functions was never closed. Also, it is easier to track scope.exit() if it is near to scope.enter() 2) Register namespace ids for export * Disallow redeclaration of enum with const enum
- Loading branch information
1 parent
293f3c9
commit 30d507c
Showing
108 changed files
with
3,974 additions
and
98 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
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
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
Oops, something went wrong.