Browse Source

Fixed SD2-642: Region inside class method not recognised

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1368 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
d4e9eff246
  1. 15
      src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs

15
src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs

@ -22,6 +22,14 @@ namespace ICSharpCode.NRefactory.Parser.CSharp @@ -22,6 +22,14 @@ namespace ICSharpCode.NRefactory.Parser.CSharp
{
}
void ReadPreProcessingDirective()
{
Point start = new Point(Col - 1, Line);
string directive = ReadIdent('#');
string argument = ReadToEOL();
this.specialTracker.AddPreProcessingDirective(directive, argument.Trim(), start, new Point(start.X + directive.Length + argument.Length, start.Y));
}
protected override Token Next()
{
int nextChar;
@ -47,10 +55,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp @@ -47,10 +55,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp
}
break;
case '#':
Point start = new Point(Col - 1, Line);
string directive = ReadIdent('#');
string argument = ReadToEOL();
this.specialTracker.AddPreProcessingDirective(directive, argument.Trim(), start, new Point(start.X + directive.Length + argument.Length, start.Y));
ReadPreProcessingDirective();
continue;
case '"':
token = ReadString();
@ -817,7 +822,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp @@ -817,7 +822,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp
}
break;
case '#':
SkipToEOL();
ReadPreProcessingDirective();
break;
case '"':
ReadString();

Loading…
Cancel
Save