fix corner case with export

This commit is contained in:
alexlamsl 2021-04-25 21:02:15 +08:00
parent a1a212f639
commit e9b40ec3cf
2 changed files with 8 additions and 0 deletions

View File

@ -1495,6 +1495,7 @@ function parse($TEXT, options) {
body.start = start;
body.end = prev();
} else {
handle_regexp();
body = expression();
semicolon();
}

View File

@ -91,6 +91,13 @@ defaults_parentheses_6: {
expect_exact: 'export default(function(){while(!console);})()?"FAIL":"PASS";'
}
defaults_regexp: {
input: {
export default /foo/;
}
expect_exact: "export default/foo/;"
}
foreign: {
input: {
export * from "foo";