Fix bug where the Smalltalk source reader was loosing the last character

of a symbol token that appears immediately before the end of input.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@36776 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2013-06-30 17:42:15 +00:00
parent 0e94ff5bac
commit 254398ccdf
2 changed files with 4 additions and 3 deletions

View file

@ -7,6 +7,7 @@
- Prevent out of range accesses for the input string.
- Exponent of a real number must contain at least one digit.
- Incorrect token range for character literals.
- Incorrect token range for symbol immediately before end of source.
2013-05-26 Wolfgang Lux <wolfgang.lux@gmail.com>

View file

@ -552,15 +552,15 @@ static NSString *_STNormalizeStringToken(NSString *token)
if ([identStartCharacterSet characterIsMember:c])
{
srcOffset++;
do
{
srcOffset++;
if (AT_END)
break;
c = GET_CHAR;
c = PEEK_CHAR;
}
while ([identCharacterSet characterIsMember:c] || c == ':');
srcOffset--;
tokenRange = NSMakeRange(start + 1, srcOffset - start - 1);
return STSymbolTokenType;
}