Support printing import("a") (#458)
parent
f8f0b340e0
commit
6e68f7495f
|
@ -458,6 +458,10 @@ function genericPrintNoParens(path, options, print) {
|
|||
parts.push(path.call(print, "source"), ";");
|
||||
|
||||
return concat(parts);
|
||||
|
||||
case "Import": {
|
||||
return "import";
|
||||
}
|
||||
case "BlockStatement": {
|
||||
var naked = path.call(
|
||||
function(bodyPath) {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
exports[`test test.js 1`] = `
|
||||
"import(\"module.js\");
|
||||
import(\"module.js\").then((a) => a);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
import(\"module.js\");
|
||||
import(\"module.js\").then(a => a);
|
||||
"
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, {parser: 'babylon'});
|
|
@ -0,0 +1,2 @@
|
|||
import("module.js");
|
||||
import("module.js").then((a) => a);
|
Loading…
Reference in New Issue