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

Function visitLeftAssociativeBinaryExpression

test/fixtures/snapshot/typescript.js:102365–102384  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

102363 return ts.visitEachChild(node, visitor, context);
102364 }
102365 function visitLeftAssociativeBinaryExpression(node) {
102366 if (containsYield(node.right)) {
102367 if (ts.isLogicalOperator(node.operatorToken.kind)) {
102368 return visitLogicalBinaryExpression(node);
102369 }
102370 else if (node.operatorToken.kind === 27 /* SyntaxKind.CommaToken */) {
102371 return visitCommaExpression(node);
102372 }
102373 // [source]
102374 // a() + (yield) + c()
102375 //
102376 // [intermediate]
102377 // .local _a
102378 // _a = a();
102379 // .yield resumeLabel
102380 // _a + %sent% + c()
102381 return factory.updateBinaryExpression(node, cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression)), node.operatorToken, ts.visitNode(node.right, visitor, ts.isExpression));
102382 }
102383 return ts.visitEachChild(node, visitor, context);
102384 }
102385 /**
102386 * Visits a comma expression containing `yield`.
102387 *

Callers 1

visitBinaryExpressionFunction · 0.85

Calls 4

visitCommaExpressionFunction · 0.85
cacheExpressionFunction · 0.85
containsYieldFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…