Add parser support for placeholders (#9364)

This commit is contained in:
Nicolò Ribaudo
2019-03-05 00:45:42 +01:00
committed by GitHub
parent c60c4dd375
commit d832c0f434
141 changed files with 7630 additions and 36 deletions

View File

@@ -1048,19 +1048,8 @@ export default class ExpressionParser extends LValParser {
if (isPrivate) {
this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]);
const node = this.startNode();
const columnHashEnd = this.state.end;
this.next();
const columnIdentifierStart = this.state.start;
const spacesBetweenHashAndIdentifier =
columnIdentifierStart - columnHashEnd;
if (spacesBetweenHashAndIdentifier != 0) {
this.raise(
columnIdentifierStart,
"Unexpected space between # and identifier",
);
}
this.assertNoSpace("Unexpected space between # and identifier");
node.id = this.parseIdentifier(true);
return this.finishNode(node, "PrivateName");
} else {