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

Function checkYieldExpressionGrammar

test/fixtures/snapshot/typescript.js:79438–79445  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79436 }
79437 return type;
79438 function checkYieldExpressionGrammar() {
79439 if (!(node.flags & 8192 /* NodeFlags.YieldContext */)) {
79440 grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);
79441 }
79442 if (isInParameterInitializerBeforeContainingFunction(node)) {
79443 error(node, ts.Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer);
79444 }
79445 }
79446 }
79447 function checkConditionalExpression(node, checkMode) {
79448 checkTruthinessExpression(node.condition);

Callers

nothing calls this directly

Calls 3

grammarErrorOnFirstTokenFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…