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

Function bindLogicalLikeExpression

test/fixtures/snapshot/typescript.js:45867–45886  ·  view source on GitHub ↗
(node, trueTarget, falseTarget)

Source from the content-addressed store, hash-verified

45865 }
45866 }
45867 function bindLogicalLikeExpression(node, trueTarget, falseTarget) {
45868 var preRightLabel = createBranchLabel();
45869 if (node.operatorToken.kind === 55 /* SyntaxKind.AmpersandAmpersandToken */ || node.operatorToken.kind === 76 /* SyntaxKind.AmpersandAmpersandEqualsToken */) {
45870 bindCondition(node.left, preRightLabel, falseTarget);
45871 }
45872 else {
45873 bindCondition(node.left, trueTarget, preRightLabel);
45874 }
45875 currentFlow = finishFlowLabel(preRightLabel);
45876 bind(node.operatorToken);
45877 if (ts.isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind)) {
45878 doWithConditionalBranches(bind, node.right, trueTarget, falseTarget);
45879 bindAssignmentTargetFlow(node.left);
45880 addAntecedent(trueTarget, createFlowCondition(32 /* FlowFlags.TrueCondition */, currentFlow, node));
45881 addAntecedent(falseTarget, createFlowCondition(64 /* FlowFlags.FalseCondition */, currentFlow, node));
45882 }
45883 else {
45884 bindCondition(node.right, trueTarget, falseTarget);
45885 }
45886 }
45887 function bindPrefixUnaryExpressionFlow(node) {
45888 if (node.operator === 53 /* SyntaxKind.ExclamationToken */) {
45889 var saveTrueTarget = currentTrueTarget;

Callers 1

onEnterFunction · 0.85

Calls 8

createBranchLabelFunction · 0.85
bindConditionFunction · 0.85
finishFlowLabelFunction · 0.85
bindAssignmentTargetFlowFunction · 0.85
addAntecedentFunction · 0.85
createFlowConditionFunction · 0.85
bindFunction · 0.70

Tested by

no test coverage detected