Add identifier name to node loc field (#90)

This commit is contained in:
Sebastian McKenzie
2016-08-16 14:41:10 +01:00
committed by Henry Zhu
parent 69e914baeb
commit 0b87d4c97c
3 changed files with 103 additions and 0 deletions

View File

@@ -979,6 +979,8 @@ pp.parseIdentifier = function (liberal) {
this.raise(node.start, "invalid use of await inside of an async function");
}
node.loc.identifierName = node.name;
this.next();
return this.finishNode(node, "Identifier");
};