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

Function withTopicBindingContext

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

Source from the content-addressed store, hash-verified

3101 // to the old hack pipeline flags that it had before the function was called.
3102
3103 withTopicBindingContext<T>(callback: () => T): T {
3104 const oldInHackPipelineBody = this.state.inHackPipelineBody;
3105 this.state.inHackPipelineBody = true;
3106 const oldSeenTopicReference = this.state.seenTopicReference;
3107 this.state.seenTopicReference = false;
3108
3109 try {
3110 return callback();
3111 } finally {
3112 this.state.inHackPipelineBody = oldInHackPipelineBody;
3113 this.state.seenTopicReference = oldSeenTopicReference;
3114 }
3115 }
3116
3117 // Enter a production parameter frame with [+In] set, unless the current
3118 // 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