remove allowImportExportEverywhere

This commit is contained in:
Sebastian McKenzie
2015-01-13 00:10:12 +11:00
parent ea627ed57c
commit fbb150cfc1
2 changed files with 13 additions and 9 deletions

View File

@@ -11,6 +11,11 @@
_Note: Gaps between patch versions are faulty/broken releases._
## 3.0.0
* **Breaking Change**
* `allowImportExportEverywhere` acorn option has been disabled for spec compliancy so imports and exports can **only** be present at the top level.
## 2.10.1
* **Internal**

View File

@@ -216,15 +216,14 @@ exports.parse = function (opts, code, callback) {
var tokens = [];
var ast = acorn.parse(code, {
allowImportExportEverywhere: true,
allowReturnOutsideFunction: true,
ecmaVersion: opts.experimental ? 7 : 6,
playground: opts.playground,
strictMode: true,
onComment: comments,
locations: true,
onToken: tokens,
ranges: true
allowReturnOutsideFunction: true,
ecmaVersion: opts.experimental ? 7 : 6,
playground: opts.playground,
strictMode: true,
onComment: comments,
locations: true,
onToken: tokens,
ranges: true
});
estraverse.attachComments(ast, comments, tokens);