diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index 72fc7bf80fb..2bfb155921e 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -33,11 +33,11 @@ module ts.formatting { } public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { - Debug.assert(currentRange != null, "currentTokenSpan is null"); - Debug.assert(currentTokenParent != null, "currentTokenParent is null"); - Debug.assert(nextRange != null, "nextTokenSpan is null"); - Debug.assert(nextTokenParent != null, "nextTokenParent is null"); - Debug.assert(commonParent != null, "commonParent is null"); + Debug.assert(currentRange !== undefined, "currentTokenSpan is null"); + Debug.assert(currentTokenParent !== undefined, "currentTokenParent is null"); + Debug.assert(nextRange !== undefined, "nextTokenSpan is null"); + Debug.assert(nextTokenParent !== undefined, "nextTokenParent is null"); + Debug.assert(commonParent !== undefined, "commonParent is null"); this.currentTokenSpan = currentRange; this.currentTokenParent = currentTokenParent; diff --git a/src/services/formatting/ruleDescriptor.ts b/src/services/formatting/ruleDescriptor.ts index 0a9a5285133..e5b7d6f3186 100644 --- a/src/services/formatting/ruleDescriptor.ts +++ b/src/services/formatting/ruleDescriptor.ts @@ -34,7 +34,6 @@ module ts.formatting { } static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor - //: this(TokenRange.FromToken(left), right) { return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), right); } diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 34ed2b74d91..4b42591936e 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -450,44 +450,6 @@ module ts.formatting { case SyntaxKind.BinaryExpression: case SyntaxKind.ConditionalExpression: return true; - //// binary expressions - //case SyntaxKind.AssignmentExpression: - //case SyntaxKind.AddAssignmentExpression: - //case SyntaxKind.SubtractAssignmentExpression: - //case SyntaxKind.MultiplyAssignmentExpression: - //case SyntaxKind.DivideAssignmentExpression: - //case SyntaxKind.ModuloAssignmentExpression: - //case SyntaxKind.AndAssignmentExpression: - //case SyntaxKind.ExclusiveOrAssignmentExpression: - //case SyntaxKind.OrAssignmentExpression: - //case SyntaxKind.LeftShiftAssignmentExpression: - //case SyntaxKind.SignedRightShiftAssignmentExpression: - //case SyntaxKind.UnsignedRightShiftAssignmentExpression: - //case SyntaxKind.ConditionalExpression: - //case SyntaxKind.LogicalOrExpression: - //case SyntaxKind.LogicalAndExpression: - //case SyntaxKind.BitwiseOrExpression: - //case SyntaxKind.BitwiseExclusiveOrExpression: - //case SyntaxKind.BitwiseAndExpression: - //case SyntaxKind.EqualsWithTypeConversionExpression: - //case SyntaxKind.NotEqualsWithTypeConversionExpression: - //case SyntaxKind.EqualsExpression: - //case SyntaxKind.NotEqualsExpression: - //case SyntaxKind.LessThanExpression: - //case SyntaxKind.GreaterThanExpression: - //case SyntaxKind.LessThanOrEqualExpression: - //case SyntaxKind.GreaterThanOrEqualExpression: - //case SyntaxKind.InstanceOfExpression: - //case SyntaxKind.InExpression: - //case SyntaxKind.LeftShiftExpression: - //case SyntaxKind.SignedRightShiftExpression: - //case SyntaxKind.UnsignedRightShiftExpression: - //case SyntaxKind.MultiplyExpression: - //case SyntaxKind.DivideExpression: - //case SyntaxKind.ModuloExpression: - //case SyntaxKind.AddExpression: - //case SyntaxKind.SubtractExpression: - // return true; // equal in import a = module('a'); case SyntaxKind.ImportDeclaration: