mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-16 05:58:32 -06:00
PR Feedback
This commit is contained in:
parent
fe13cdc7bd
commit
033864be82
@ -1248,7 +1248,7 @@ namespace ts {
|
||||
// x|(a|b) => x|a|b
|
||||
// x&(a&b) => x&a&b
|
||||
// x^(a^b) => x^a^b
|
||||
if (isMathAssociativeOperator(binaryOperator)) {
|
||||
if (operatorHasAssociativeProperty(binaryOperator)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1286,7 +1286,7 @@ namespace ts {
|
||||
*
|
||||
* @param binaryOperator The binary operator.
|
||||
*/
|
||||
function isMathAssociativeOperator(binaryOperator: SyntaxKind) {
|
||||
function operatorHasAssociativeProperty(binaryOperator: SyntaxKind) {
|
||||
// The following operators are associative in JavaScript:
|
||||
// (a*b)*c -> a*(b*c) -> a*b*c
|
||||
// (a|b)|c -> a|(b|c) -> a|b|c
|
||||
|
||||
@ -2431,7 +2431,6 @@ namespace ts {
|
||||
// ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's
|
||||
// <CR><LF> and <CR> LineTerminatorSequences are normalized to <LF> for both TV and TRV.
|
||||
text = text.replace(/\r\n?/g, "\n");
|
||||
//text = escapeString(text);
|
||||
return createLiteral(text, /*location*/ node);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user