set location info on ThisExpression node in this shorthand - fixes 6to5/6to5#367

This commit is contained in:
Sebastian McKenzie 2015-01-03 06:09:37 +11:00
parent c8fc778ffb
commit 017d76c720
2 changed files with 3 additions and 2 deletions

View File

@ -2570,8 +2570,9 @@
case _at:
var start = storeCurrentPos();
var node = startNode();
var thisNode = startNode();
next();
node.object = { type: "ThisExpression" }
node.object = finishNode(thisNode, "ThisExpression");
node.property = parseSubscripts(parseIdent(), start);
node.computed = false;
return finishNode(node, "MemberExpression");

View File

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