File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2117,7 +2117,8 @@ module ts {
2117
2117
* or equal precedence to the binary '+' operator
2118
2118
*/
2119
2119
function comparePrecedenceToBinaryPlus ( expression : Expression ) : Comparison {
2120
- // All binary expressions have lower precedence than '+' apart from '*', '/', and '%'.
2120
+ // All binary expressions have lower precedence than '+' apart from '*', '/', and '%'
2121
+ // which have greater precedence and '-' which has equal precedence.
2121
2122
// All unary operators have a higher precedence apart from yield.
2122
2123
// Arrow functions and conditionals have a lower precedence,
2123
2124
// although we convert the former into regular function expressions in ES5 mode,
@@ -2134,6 +2135,7 @@ module ts {
2134
2135
case SyntaxKind . PercentToken :
2135
2136
return Comparison . GreaterThan ;
2136
2137
case SyntaxKind . PlusToken :
2138
+ case SyntaxKind . MinusToken :
2137
2139
return Comparison . EqualTo ;
2138
2140
default :
2139
2141
return Comparison . LessThan ;
You can’t perform that action at this time.
0 commit comments