Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix problems with export and function/class declarations.
This stops Normalize from splitting export default + a function/class declarations with since default exports are unnamed. It also stops rewriting of export function foo() {} to export var foo = function() {]; as foo is block-scoped and hoisted (so #429 does not apply). Also changes the behavior of some NodeUtil helpers and unit tests to acknowledge that export default can contain module-level function and class declarations, which is both technically correct and should aid future work on export statements. For example, this creates a function foo in the module scope: export default function foo() {}; ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168056022
- Loading branch information
1 parent
8a5b6cc
commit 1c24f9e
Showing
6 changed files
with
68 additions
and
24 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