(node *ast.Node)
| 2287 | } |
| 2288 | |
| 2289 | func (b *Binder) bindConditionalExpressionFlow(node *ast.Node) { |
| 2290 | expr := node.AsConditionalExpression() |
| 2291 | trueLabel := b.createBranchLabel() |
| 2292 | falseLabel := b.createBranchLabel() |
| 2293 | postExpressionLabel := b.createBranchLabel() |
| 2294 | saveCurrentFlow := b.currentFlow |
| 2295 | saveHasFlowEffects := b.hasFlowEffects |
| 2296 | b.hasFlowEffects = false |
| 2297 | b.bindCondition(expr.Condition, trueLabel, falseLabel) |
| 2298 | b.currentFlow = b.finishFlowLabel(trueLabel) |
| 2299 | b.bind(expr.QuestionToken) |
| 2300 | b.bind(expr.WhenTrue) |
| 2301 | b.addAntecedent(postExpressionLabel, b.currentFlow) |
| 2302 | b.currentFlow = b.finishFlowLabel(falseLabel) |
| 2303 | b.bind(expr.ColonToken) |
| 2304 | b.bind(expr.WhenFalse) |
| 2305 | b.addAntecedent(postExpressionLabel, b.currentFlow) |
| 2306 | if b.hasFlowEffects { |
| 2307 | b.currentFlow = b.finishFlowLabel(postExpressionLabel) |
| 2308 | } else { |
| 2309 | b.currentFlow = saveCurrentFlow |
| 2310 | } |
| 2311 | b.hasFlowEffects = b.hasFlowEffects || saveHasFlowEffects |
| 2312 | } |
| 2313 | |
| 2314 | func (b *Binder) bindVariableDeclarationFlow(node *ast.Node) { |
| 2315 | b.bindEachChild(node) |
no test coverage detected