(
this: Parser,
base: N.Expression | N.Super,
startLoc: Position,
state: N.ParseSubscriptState,
computed: boolean,
optional: boolean,
)
| 905 | // base[?Yield, ?Await] . PrivateIdentifier |
| 906 | // where `base` is one of CallExpression, MemberExpression and OptionalChain |
| 907 | parseMember( |
| 908 | this: Parser, |
| 909 | base: N.Expression | N.Super, |
| 910 | startLoc: Position, |
| 911 | state: N.ParseSubscriptState, |
| 912 | computed: boolean, |
| 913 | optional: boolean, |
| 914 | ): N.OptionalMemberExpression | N.MemberExpression { |
| 915 | const node = this.startNodeAt< |
| 916 | N.OptionalMemberExpression | N.MemberExpression |
| 917 | >(startLoc); |
| 918 | node.object = base; |
| 919 | node.computed = computed; |
| 920 | if (computed) { |
| 921 | node.property = this.parseExpression(); |
| 922 | this.expect(tt.bracketR); |
| 923 | } else if (this.match(tt.privateName)) { |
| 924 | if (base.type === "Super") { |
| 925 | this.raise(Errors.SuperPrivateField, startLoc); |
| 926 | } |
| 927 | this.classScope.usePrivateName(this.state.value, this.state.startLoc); |
| 928 | node.property = this.parsePrivateName(); |
| 929 | } else { |
| 930 | node.property = this.parseIdentifier(true); |
| 931 | } |
| 932 | |
| 933 | if (state.optionalChainMember) { |
| 934 | (node as Undone<N.OptionalMemberExpression>).optional = optional; |
| 935 | return this.finishNode(node, "OptionalMemberExpression"); |
| 936 | } else { |
| 937 | return this.finishNode(node, "MemberExpression"); |
| 938 | } |
| 939 | } |
| 940 | |
| 941 | // https://github.com/tc39/proposal-bind-operator#syntax |
| 942 | parseBind( |
nothing calls this directly
no test coverage detected