upgrade acorn

This commit is contained in:
Sebastian McKenzie
2014-12-27 21:24:34 +11:00
parent add0a7d5fe
commit 7fcd8ea642
2 changed files with 10 additions and 9 deletions

View File

@@ -221,14 +221,15 @@ exports.parse = function (opts, code, callback) {
var tokens = [];
var ast = acorn.parse(code, {
allowReturnOutsideFunction: true,
ecmaVersion: opts.experimental ? 7 : 6,
playground: opts.playground,
strictMode: true,
onComment: comments,
locations: true,
onToken: tokens,
ranges: true
allowImportExportEverywhere: 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);