MCPcopy Create free account
hub / github.com/babel/babel / parseTaggedTemplateExpression

Function parseTaggedTemplateExpression

packages/babel-parser/src/parser/expression.ts:1039–1052  ·  view source on GitHub ↗
(
    this: Parser,
    base: N.Expression,
    startLoc: Position,
    state: N.ParseSubscriptState,
  )

Source from the content-addressed store, hash-verified

1037 // MemberExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]
1038 // CallExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]
1039 parseTaggedTemplateExpression(
1040 this: Parser,
1041 base: N.Expression,
1042 startLoc: Position,
1043 state: N.ParseSubscriptState,
1044 ): N.TaggedTemplateExpression {
1045 const node = this.startNodeAt<N.TaggedTemplateExpression>(startLoc);
1046 node.tag = base;
1047 node.quasi = this.parseTemplate(true);
1048 if (state.optionalChainMember) {
1049 this.raise(Errors.OptionalChainingNoTemplate, startLoc);
1050 }
1051 return this.finishNode(node, "TaggedTemplateExpression");
1052 }
1053
1054 atPossibleAsyncArrow(base: N.Expression | N.Super | N.Import): boolean {
1055 return (

Callers

nothing calls this directly

Calls 1

finishNodeMethod · 0.80

Tested by

no test coverage detected