MCPcopy Index your code
hub / github.com/nodejs/node / parseFunctionBlock

Function parseFunctionBlock

test/fixtures/snapshot/typescript.js:35850–35871  ·  view source on GitHub ↗
(flags, diagnosticMessage)

Source from the content-addressed store, hash-verified

35848 }
35849 }
35850 function parseFunctionBlock(flags, diagnosticMessage) {
35851 var savedYieldContext = inYieldContext();
35852 setYieldContext(!!(flags & 1 /* SignatureFlags.Yield */));
35853 var savedAwaitContext = inAwaitContext();
35854 setAwaitContext(!!(flags & 2 /* SignatureFlags.Await */));
35855 var savedTopLevel = topLevel;
35856 topLevel = false;
35857 // We may be in a [Decorator] context when parsing a function expression or
35858 // arrow function. The body of the function is not in [Decorator] context.
35859 var saveDecoratorContext = inDecoratorContext();
35860 if (saveDecoratorContext) {
35861 setDecoratorContext(/*val*/ false);
35862 }
35863 var block = parseBlock(!!(flags & 16 /* SignatureFlags.IgnoreMissingOpenBrace */), diagnosticMessage);
35864 if (saveDecoratorContext) {
35865 setDecoratorContext(/*val*/ true);
35866 }
35867 topLevel = savedTopLevel;
35868 setYieldContext(savedYieldContext);
35869 setAwaitContext(savedAwaitContext);
35870 return block;
35871 }
35872 function parseEmptyStatement() {
35873 var pos = getNodePos();
35874 var hasJSDoc = hasPrecedingJSDocComment();

Callers 3

parseFunctionExpressionFunction · 0.85

Calls 7

inYieldContextFunction · 0.85
setYieldContextFunction · 0.85
inAwaitContextFunction · 0.85
setAwaitContextFunction · 0.85
inDecoratorContextFunction · 0.85
setDecoratorContextFunction · 0.85
parseBlockFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…