Conflicts:
	acorn.js
	package.json
This commit is contained in:
Sebastian McKenzie 2014-11-30 11:09:25 +11:00
commit 0bf7938142
2 changed files with 8 additions and 13 deletions

View File

@ -637,9 +637,7 @@
tokEnd = tokPos;
if (options.locations) tokEndLoc = new Position;
tokType = type;
if (shouldSkipSpace !== false && !(inXJSChild && tokType !== _braceL)) {
skipSpace();
}
if (shouldSkipSpace !== false) skipSpace();
tokVal = val;
tokRegexpAllowed = type.beforeExpr;
if (options.onToken) {
@ -884,7 +882,7 @@
case 91: ++tokPos; return finishToken(_bracketL);
case 93: ++tokPos; return finishToken(_bracketR);
case 123: ++tokPos; return finishToken(_braceL);
case 125: ++tokPos; return finishToken(_braceR, undefined, !inXJSChildExpression);
case 125: ++tokPos; return finishToken(_braceR, undefined, !inXJSChild);
case 63: ++tokPos; return finishToken(_question);
case 58:
@ -2689,8 +2687,6 @@
function parseObj() {
var node = startNode(), first = true, propHash = {};
node.properties = [];
var origInXJSChildExpression = inXJSChildExpression;
inXJSChildExpression = false;
next();
while (!eat(_braceR)) {
if (!first) {
@ -2738,7 +2734,6 @@
checkPropClash(prop, propHash);
node.properties.push(finishNode(prop, "Property"));
}
inXJSChildExpression = origInXJSChildExpression;
return finishNode(node, "ObjectExpression");
}
@ -3329,15 +3324,16 @@
inXJSTag = false;
inXJSChild = false;
inXJSChildExpression = origInXJSChild;
next();
node.expression = tokType === _braceR ? parseXJSEmptyExpression() : parseExpression();
inXJSTag = origInXJSTag;
inXJSChild = origInXJSChild;
inXJSChildExpression = false;
if (inXJSChild) {
tokPos = tokEnd;
}
expect(_braceR);
return finishNode(node, "XJSExpressionContainer");
}
@ -3348,14 +3344,13 @@
if (tokType === _braceL) {
var tokStart1 = tokStart, tokStartLoc1 = tokStartLoc;
var origInXJSTag = inXJSTag, origInXJSChildExpression = inXJSChildExpression;
inXJSTag = inXJSChildExpression = false;
var origInXJSTag = inXJSTag;
inXJSTag = false;
next();
if (tokType !== _ellipsis) unexpected();
var node = parseMaybeUnary();
inXJSChildExpression = origInXJSChildExpression;
inXJSTag = origInXJSTag;
expect(_braceR);

View File

@ -2,7 +2,7 @@
"name": "acorn-6to5",
"description": "Acorn fork used by 6to5",
"main": "acorn.js",
"version": "0.9.1-10",
"version": "0.9.1-11",
"maintainers": [
{
"name": "Marijn Haverbeke",