Browse Source

fixed http://community.sharpdevelop.net/forums/t/11681.aspx

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6406 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Siegfried Pammer 16 years ago
parent
commit
36591a0942
  1. 6
      src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs

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

@ -97,7 +97,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp @@ -97,7 +97,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp
}
}
break;
default:
default:
isAtLineBegin = false; // non-ws chars are handled here
ch = (char)nextChar;
if (Char.IsLetter(ch) || ch == '_' || ch == '\\') {
@ -166,7 +166,9 @@ namespace ICSharpCode.NRefactory.Parser.CSharp @@ -166,7 +166,9 @@ namespace ICSharpCode.NRefactory.Parser.CSharp
}
if (curPos < MAX_IDENTIFIER_LENGTH) {
identBuffer[curPos++] = ch;
if (ch != '\0') // only add character, if it is valid
// prevents \ from being added
identBuffer[curPos++] = ch;
} else {
errors.Error(Line, Col, String.Format("Identifier too long"));
while (IsIdentifierPart(ReaderPeek())) {

Loading…
Cancel
Save