Author: gonzalo
Date: 2006-09-24 10:40:04 -0400 (Sun, 24 Sep 2006)
New Revision: 65853
Modified:
trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
trunk/mcs/class/System/Microsoft.CSharp/ChangeLog
Log:
revert my last patch. It broke a test
Modified: trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
===================================================================
--- trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
2006-09-24 14:03:22 UTC (rev 65852)
+++ trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
2006-09-24 14:40:04 UTC (rev 65853)
@@ -343,7 +343,6 @@
Output.WriteLine (";");
}
- static char [] crlf = new char [] { '\r', '\n' };
protected override void GenerateComment (CodeComment comment)
{
TextWriter output = Output;
@@ -356,14 +355,23 @@
commentChars = "//";
}
- string [] text = comment.Text.Split (crlf);
- foreach (string t in text) {
- if (t != "") {
+ output.Write (commentChars);
+ output.Write (' ');
+ string text = comment.Text;
+
+ for (int i = 0; i < text.Length; i++) {
+ output.Write (text[i]);
+ if (text[i] == '\r') {
+ if (i < (text.Length - 1) && text[i +
1] == '\n') {
+ continue;
+ }
output.Write (commentChars);
- output.Write (' ');
- output.WriteLine (t);
+ } else if (text[i] == '\n') {
+ output.Write (commentChars);
}
}
+
+ output.WriteLine ();
}
protected override void GenerateMethodReturnStatement
(CodeMethodReturnStatement statement)
Modified: trunk/mcs/class/System/Microsoft.CSharp/ChangeLog
===================================================================
--- trunk/mcs/class/System/Microsoft.CSharp/ChangeLog 2006-09-24 14:03:22 UTC
(rev 65852)
+++ trunk/mcs/class/System/Microsoft.CSharp/ChangeLog 2006-09-24 14:40:04 UTC
(rev 65853)
@@ -1,8 +1,3 @@
-2006-09-19 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
-
- * CSharpCodeGenerator.cs: indent comment lines after the first one and
- speed it up a little bit.
-
2006-08-08 Gert Driesen <[EMAIL PROTECTED]>
* CSharpCodeCompiler.cs: Added support for embedded resources, fixes
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches