Author: mkrueger
Date: 2007-08-22 05:39:44 -0400 (Wed, 22 Aug 2007)
New Revision: 84604
Modified:
trunk/monodevelop/Core/src/NRefactory/ChangeLog
trunk/monodevelop/Core/src/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs
Log:
* Project/Src/Lexer/CSharp/Lexer.cs: Fixed 82529:TaskList doesn't
update when using comments: /**/.
Modified: trunk/monodevelop/Core/src/NRefactory/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/NRefactory/ChangeLog 2007-08-22 06:16:09 UTC
(rev 84603)
+++ trunk/monodevelop/Core/src/NRefactory/ChangeLog 2007-08-22 09:39:44 UTC
(rev 84604)
@@ -1,3 +1,8 @@
+2007-08-22 Mike Krüger <[EMAIL PROTECTED]>
+
+ * Project/Src/Lexer/CSharp/Lexer.cs: Fixed 82529:TaskList doesn't update
+ when using comments: /**/.
+
2007-07-24 Jeffrey Stedfast <[EMAIL PROTECTED]>
Part of the fix for bug #82114.
Modified:
trunk/monodevelop/Core/src/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs
===================================================================
--- trunk/monodevelop/Core/src/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs
2007-08-22 06:16:09 UTC (rev 84603)
+++ trunk/monodevelop/Core/src/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs
2007-08-22 09:39:44 UTC (rev 84604)
@@ -736,54 +736,73 @@
}
}
return sb.ToString();
- }
-
- void ReadSingleLineComment(CommentType commentType)
- {
- if (skipAllComments) {
- SkipToEOL();
- } else {
- specialTracker.StartComment(commentType, new
Point(Col, Line));
- specialTracker.AddString(ReadCommentToEOL());
- specialTracker.FinishComment(new Point(Col,
Line));
- }
- }
-
+ }
+
void ReadMultiLineComment()
{
int nextChar;
- if (skipAllComments) {
+ if (this.SkipAllComments) {
while ((nextChar = ReaderRead()) != -1) {
char ch = (char)nextChar;
if (ch == '*' && ReaderPeek() == '/') {
ReaderRead();
return;
+ } else {
+ HandleLineEnd(ch);
}
}
} else {
- specialTracker.StartComment(CommentType.Block,
new Point(Col, Line));
+ // sc* = special comment handling (TO DO
markers)
+ string scTag = null; // is set to non-null
value when we are inside a comment marker
+ StringBuilder scCurWord = new StringBuilder();
// current word, (scTag == null) or comment (when scTag != null)
+
while ((nextChar = ReaderRead()) != -1) {
char ch = (char)nextChar;
if (HandleLineEnd(ch)) {
- specialTracker.AddChar('\n');
+ if (scTag != null) {
+
this.TagComments.Add(new TagComment(scTag, scCurWord.ToString(), new Point(Col,
Line), new Point(Col, Line)));
+ scTag = null;
+ }
+ scCurWord.Length = 0;
+
specialTracker.AddString(Environment.NewLine);
continue;
}
// End of multiline comment reached ?
if (ch == '*' && ReaderPeek() == '/') {
+ if (scTag != null) {
+
this.TagComments.Add(new TagComment(scTag, scCurWord.ToString(), new Point(Col,
Line), new Point(Col, Line)));
+ }
ReaderRead();
-
specialTracker.FinishComment(new Point(Col, Line));
return;
}
specialTracker.AddChar(ch);
+ if (scTag != null ||
IsIdentifierPart(ch)) {
+ scCurWord.Append(ch);
+ } else {
+ if (specialCommentHash != null
&& specialCommentHash.ContainsKey(scCurWord.ToString())) {
+ scTag =
scCurWord.ToString();
+ }
+ scCurWord.Length = 0;
+ }
}
- specialTracker.FinishComment(new Point(Col,
Line));
}
// Reached EOF before end of multiline comment.
errors.Error(Line, Col, String.Format("Reached EOF
before the end of a multiline comment"));
+ }
+ void ReadSingleLineComment(CommentType commentType)
+ {
+ if (skipAllComments) {
+ SkipToEOL();
+ } else {
+ specialTracker.StartComment(commentType, new
Point(Col, Line));
+ specialTracker.AddString(ReadCommentToEOL());
+ specialTracker.FinishComment(new Point(Col,
Line));
+ }
}
+
/// <summary>
/// Skips to the end of the current code block.
/// For this, the lexer must have read the next token AFTER the
token opening the
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches