Browse Source

* AstFormattingVisitor.cs: Fixed bug in binary operator expression.

* cs-parser.cs:
* cs-parser.jay: Fixed bug in "for" statement locations.
newNRvisualizers
mike 14 years ago
parent
commit
e43634786e
  1. 4
      ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs
  2. 2
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
  3. 2
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay

4
ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
//
//
// AstFormattingVisitor.cs
//
// Author:
@ -1390,7 +1390,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -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);

2
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs

@ -8064,7 +8064,7 @@ void case_806() @@ -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;
}

2
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay

@ -5333,7 +5333,7 @@ for_statement @@ -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

Loading…
Cancel
Save