Add parser support for placeholders (#9364)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user