Addressed CR feedback.

This commit is contained in:
Daniel Rosenwasser
2014-11-19 22:11:17 -08:00
parent f51a42c6de
commit 8d4e9064d0

View File

@@ -869,14 +869,13 @@ module ts {
function templateNeedsParens(template: TemplateExpression, parent: Expression) {
switch (parent.kind) {
case SyntaxKind.TaggedTemplateExpression:
Debug.fail("Path should be unreachable; tagged templates not supported pre-ES6!");
//return (<TaggedTemplateExpression>parent).tag === template;
case SyntaxKind.CallExpression:
case SyntaxKind.NewExpression:
return (<CallExpression>parent).func === template;
case SyntaxKind.ParenExpression:
return false;
case SyntaxKind.TaggedTemplateExpression:
Debug.fail("Path should be unreachable; tagged templates not supported pre-ES6.");
default:
return comparePrecedenceToBinaryPlus(parent) !== Comparison.LessThan;
}