(next, parent, side)
| 112399 | } |
| 112400 | } |
| 112401 | function maybeEmitExpression(next, parent, side) { |
| 112402 | var parenthesizerRule = side === "left" ? |
| 112403 | parenthesizer.getParenthesizeLeftSideOfBinaryForOperator(parent.operatorToken.kind) : |
| 112404 | parenthesizer.getParenthesizeRightSideOfBinaryForOperator(parent.operatorToken.kind); |
| 112405 | var pipelinePhase = getPipelinePhase(0 /* PipelinePhase.Notification */, 1 /* EmitHint.Expression */, next); |
| 112406 | if (pipelinePhase === pipelineEmitWithSubstitution) { |
| 112407 | ts.Debug.assertIsDefined(lastSubstitution); |
| 112408 | next = parenthesizerRule(ts.cast(lastSubstitution, ts.isExpression)); |
| 112409 | pipelinePhase = getNextPipelinePhase(1 /* PipelinePhase.Substitution */, 1 /* EmitHint.Expression */, next); |
| 112410 | lastSubstitution = undefined; |
| 112411 | } |
| 112412 | if (pipelinePhase === pipelineEmitWithComments || |
| 112413 | pipelinePhase === pipelineEmitWithSourceMaps || |
| 112414 | pipelinePhase === pipelineEmitWithHint) { |
| 112415 | if (ts.isBinaryExpression(next)) { |
| 112416 | return next; |
| 112417 | } |
| 112418 | } |
| 112419 | currentParenthesizerRule = parenthesizerRule; |
| 112420 | pipelinePhase(1 /* EmitHint.Expression */, next); |
| 112421 | } |
| 112422 | } |
| 112423 | function emitConditionalExpression(node) { |
| 112424 | var linesBeforeQuestion = getLinesBetweenNodes(node, node.condition, node.questionToken); |
no test coverage detected