You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2018. It is now read-only.
Experimenting on AST explorer with babylon6-6.13.1 and all default options.
Expected Behavior
The second line should be parsed as an ExportDefaultDeclaration and a FunctionDeclaration.
Current Behavior
The second line is being parsed as an ExportDefaultDeclaration and a FunctionExpression.
A named export with a function declaration leads to FunctionDeclaration whenever it's regular, async or generator function.
But a default export with a function declaration leads to FunctionDeclaration only when it's regular or generator function. Async functions lead to FunctionExpression. I guess that's a bug.
Input Code
See https://astexplorer.net/#/V8ggvAMIw1
Babylon/Babel Configuration
Experimenting on AST explorer with babylon6-6.13.1 and all default options.
Expected Behavior
The second line should be parsed as an
ExportDefaultDeclarationand aFunctionDeclaration.Current Behavior
The second line is being parsed as an
ExportDefaultDeclarationand aFunctionExpression.A named export with a function declaration leads to
FunctionDeclarationwhenever it's regular, async or generator function.But a default export with a function declaration leads to
FunctionDeclarationonly when it's regular or generator function. Async functions lead toFunctionExpression. I guess that's a bug.