Loose: yield support.

This commit is contained in:
Ingvar Stepanyan
2014-10-27 02:37:27 +02:00
committed by Marijn Haverbeke
parent 80f8d527ff
commit 1589a959fa
3 changed files with 19 additions and 3 deletions

View File

@@ -13,8 +13,9 @@ var stats, modes = {
parse: (typeof require === "undefined") ? window.acorn_loose : require("../acorn_loose").parse_dammit,
loose: true,
filter: function (test) {
var ecmaVersion = (test.options || {}).ecmaVersion || 5;
return ecmaVersion <= 6;
var opts = test.options || {};
if (opts.loose === false) return false;
return (opts.ecmaVersion || 5) <= 6;
}
}
}

View File

@@ -13714,6 +13714,7 @@ test("yield* 10", {
}
}, {
ecmaVersion: 6,
loose: false,
ranges: true,
locations: true
});
@@ -13778,6 +13779,7 @@ test("e => yield* 10", {
}
}, {
ecmaVersion: 6,
loose: false,
ranges: true,
locations: true
});
@@ -13851,6 +13853,7 @@ test("(function () { yield* 10 })", {
}
}, {
ecmaVersion: 6,
loose: false,
ranges: true,
locations: true
});