Make tests pass for loose parser
Define Program node extent to be the whole program, make both parser and the tests conform to this. Fix a bunch of bugs in the loose parser's handling of corner cases. Issue #151
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
parse: (typeof require === "undefined" ? window.acorn : require("../acorn_loose")).parse_dammit,
|
||||
loose: true,
|
||||
filter: function (test) {
|
||||
if (/`/.test(test.code)) return false; // FIXME remove this when the loose parse supports template strings
|
||||
var opts = test.options || {};
|
||||
if (opts.loose === false) return false;
|
||||
return (opts.ecmaVersion || 5) <= 6;
|
||||
|
||||
Reference in New Issue
Block a user