Conflicts: package.json test/run.js
This commit is contained in:
commit
5ad85c5612
5
acorn.js
5
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);
|
||||
|
||||
14
test/run.js
14
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) {
|
||||
|
||||
@ -3303,6 +3303,83 @@ var fbTestFixture = {
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
'<div>{<div {...test} />}</div>': {
|
||||
type: 'Program',
|
||||
start: 0,
|
||||
end: 30,
|
||||
body: [{
|
||||
type: 'ExpressionStatement',
|
||||
start: 0,
|
||||
end: 30,
|
||||
expression: {
|
||||
type: 'XJSElement',
|
||||
start: 0,
|
||||
end: 30,
|
||||
openingElement: {
|
||||
type: 'XJSOpeningElement',
|
||||
start: 0,
|
||||
end: 5,
|
||||
attributes: [],
|
||||
name: {
|
||||
type: 'XJSIdentifier',
|
||||
start: 1,
|
||||
end: 4,
|
||||
name: 'div'
|
||||
},
|
||||
selfClosing: false
|
||||
},
|
||||
closingElement: {
|
||||
type: 'XJSClosingElement',
|
||||
start: 24,
|
||||
end: 30,
|
||||
name: {
|
||||
type: 'XJSIdentifier',
|
||||
start: 26,
|
||||
end: 29,
|
||||
name: 'div'
|
||||
}
|
||||
},
|
||||
children: [{
|
||||
type: 'XJSExpressionContainer',
|
||||
start: 5,
|
||||
end: 24,
|
||||
expression: {
|
||||
type: 'XJSElement',
|
||||
start: 6,
|
||||
end: 23,
|
||||
openingElement: {
|
||||
type: 'XJSOpeningElement',
|
||||
start: 6,
|
||||
end: 23,
|
||||
attributes: [
|
||||
{
|
||||
type: 'XJSSpreadAttribute',
|
||||
start: 11,
|
||||
end: 20,
|
||||
argument: {
|
||||
type: 'Identifier',
|
||||
start: 15,
|
||||
end: 19,
|
||||
name: 'test'
|
||||
}
|
||||
}
|
||||
],
|
||||
name: {
|
||||
type: 'XJSIdentifier',
|
||||
start: 7,
|
||||
end: 10,
|
||||
name: 'div'
|
||||
},
|
||||
selfClosing: true
|
||||
},
|
||||
closingElement: null,
|
||||
children: []
|
||||
}
|
||||
}]
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user