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

Function withTopicBindingContext

packages/babel-parser/src/parser/expression.ts:3111–3123  ·  view source on GitHub ↗
(callback: () => T)

Source from the content-addressed store, hash-verified

3109 // to the old hack pipeline flags that it had before the function was called.
3110
3111 withTopicBindingContext<T>(callback: () => T): T {
3112 const oldInHackPipelineBody = this.state.inHackPipelineBody;
3113 this.state.inHackPipelineBody = true;
3114 const oldSeenTopicReference = this.state.seenTopicReference;
3115 this.state.seenTopicReference = false;
3116
3117 try {
3118 return callback();
3119 } finally {
3120 this.state.inHackPipelineBody = oldInHackPipelineBody;
3121 this.state.seenTopicReference = oldSeenTopicReference;
3122 }
3123 }
3124
3125 // Enter a production parameter frame with [+In] set, unless the current
3126 // frame already has it. Returns whether a new frame was entered, in which

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected