diff --git a/acorn.js b/acorn.js index b89158e41e..ce23f3c453 100644 --- a/acorn.js +++ b/acorn.js @@ -3256,13 +3256,14 @@ if (tokType === _braceL) { var tokStart1 = tokStart, tokStartLoc1 = tokStartLoc; - var origInXJSTag = inXJSTag; - inXJSTag = false; + var origInXJSTag = inXJSTag, origInXJSChildExpression = inXJSChildExpression; + inXJSTag = inXJSChildExpression = false; next(); if (tokType !== _ellipsis) unexpected(); var node = parseMaybeUnary(); + inXJSChildExpression = origInXJSChildExpression; inXJSTag = origInXJSTag; expect(_braceR); diff --git a/test/run.js b/test/run.js index f7dbbe7c94..f394353d1e 100644 --- a/test/run.js +++ b/test/run.js @@ -50,7 +50,19 @@ config: { parse: (typeof require === "undefined" ? window.acorn : require("../acorn.js")).parse } - } + }/*, + Loose: { + config: { + 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; + } + } + }*/ }; function report(state, code, message) { diff --git a/test/tests-jsx.js b/test/tests-jsx.js index d7b58acb94..d0348a253e 100644 --- a/test/tests-jsx.js +++ b/test/tests-jsx.js @@ -3303,6 +3303,83 @@ var fbTestFixture = { } ] } + }, + + '