diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index 459a196867..96fbde6b13 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -1,4 +1,4 @@ -// +// // AstFormattingVisitor.cs // // Author: @@ -1390,7 +1390,7 @@ namespace ICSharpCode.NRefactory.CSharp base.VisitBinaryOperatorExpression (binaryOperatorExpression); // Handle line breaks in binary opeartor expression. - if (binaryOperatorExpression.Left.StartLocation.Line != binaryOperatorExpression.Right.StartLocation.Line) { + if (binaryOperatorExpression.Left.EndLocation.Line != binaryOperatorExpression.Right.StartLocation.Line) { IndentLevel++; if (binaryOperatorExpression.OperatorToken.StartLocation.Line == binaryOperatorExpression.Right.StartLocation.Line) { FixStatementIndentation (binaryOperatorExpression.OperatorToken.StartLocation); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 1e64fd935a..1769de4ed3 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -8064,7 +8064,7 @@ void case_806() current_block.IsCompilerGenerated = true; For f = new For (GetLocation (yyVals[-1+yyTop])); current_block.AddStatement (f); - lbag.AddStatement (f, current_block.StartLocation, GetLocation (yyVals[0+yyTop])); + lbag.AddStatement (f, current_block.StartLocation); yyVal = f; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index b7fa8ac13f..41bc10389b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -5333,7 +5333,7 @@ for_statement current_block.IsCompilerGenerated = true; For f = new For (GetLocation ($1)); current_block.AddStatement (f); - lbag.AddStatement (f, current_block.StartLocation, GetLocation ($2)); + lbag.AddStatement (f, current_block.StartLocation); $$ = f; } for_statement_cont