fix corner case with export (#4871)
This commit is contained in:
@@ -1495,6 +1495,7 @@ function parse($TEXT, options) {
|
|||||||
body.start = start;
|
body.start = start;
|
||||||
body.end = prev();
|
body.end = prev();
|
||||||
} else {
|
} else {
|
||||||
|
handle_regexp();
|
||||||
body = expression();
|
body = expression();
|
||||||
semicolon();
|
semicolon();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,13 @@ defaults_parentheses_6: {
|
|||||||
expect_exact: 'export default(function(){while(!console);})()?"FAIL":"PASS";'
|
expect_exact: 'export default(function(){while(!console);})()?"FAIL":"PASS";'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaults_regexp: {
|
||||||
|
input: {
|
||||||
|
export default /foo/;
|
||||||
|
}
|
||||||
|
expect_exact: "export default/foo/;"
|
||||||
|
}
|
||||||
|
|
||||||
foreign: {
|
foreign: {
|
||||||
input: {
|
input: {
|
||||||
export * from "foo";
|
export * from "foo";
|
||||||
|
|||||||
Reference in New Issue
Block a user