mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 09:23:48 +02:00
* Fix bug #28818, patch from Alexey Torgashin
git-svn-id: trunk@32001 -
This commit is contained in:
parent
ebf535e7a3
commit
e8a4b6c820
@ -353,9 +353,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
SectionLength := TokenStr - TokenStart;
|
SectionLength := TokenStr - TokenStart;
|
||||||
SetLength(FCurTokenString, SectionLength);
|
SetString(FCurTokenString, TokenStart, SectionLength);
|
||||||
if SectionLength > 0 then
|
|
||||||
Move(TokenStart^, FCurTokenString[1], SectionLength);
|
|
||||||
If (FCurTokenString[1]='.') then
|
If (FCurTokenString[1]='.') then
|
||||||
FCurTokenString:='0'+FCurTokenString;
|
FCurTokenString:='0'+FCurTokenString;
|
||||||
Result := tkNumber;
|
Result := tkNumber;
|
||||||
@ -393,9 +391,7 @@ begin
|
|||||||
Case Tokenstr[0] of
|
Case Tokenstr[0] of
|
||||||
'/' : begin
|
'/' : begin
|
||||||
SectionLength := Length(FCurLine)- (TokenStr - PChar(FCurLine));
|
SectionLength := Length(FCurLine)- (TokenStr - PChar(FCurLine));
|
||||||
SetLength(FCurTokenString,SectionLength);
|
SetString(FCurTokenString, TokenStart, SectionLength);
|
||||||
if SectionLength > 0 then
|
|
||||||
Move(TokenStart^, FCurTokenString[1], SectionLength);
|
|
||||||
Fetchline;
|
Fetchline;
|
||||||
end;
|
end;
|
||||||
'*' :
|
'*' :
|
||||||
@ -407,9 +403,8 @@ begin
|
|||||||
if (TokenStr[0]=#0) then
|
if (TokenStr[0]=#0) then
|
||||||
begin
|
begin
|
||||||
SectionLength := (TokenStr - TokenStart);
|
SectionLength := (TokenStr - TokenStart);
|
||||||
SetLength(S,SectionLength);
|
SetString(S, TokenStart, SectionLength);
|
||||||
if SectionLength > 0 then
|
|
||||||
Move(TokenStart^, S[1], SectionLength);
|
|
||||||
FCurtokenString:=FCurtokenString+S;
|
FCurtokenString:=FCurtokenString+S;
|
||||||
if not fetchLine then
|
if not fetchLine then
|
||||||
Error(SUnterminatedComment, [CurRow,CurCOlumn,TokenStr[0]]);
|
Error(SUnterminatedComment, [CurRow,CurCOlumn,TokenStr[0]]);
|
||||||
@ -422,9 +417,7 @@ begin
|
|||||||
if EOC then
|
if EOC then
|
||||||
begin
|
begin
|
||||||
SectionLength := (TokenStr - TokenStart-1);
|
SectionLength := (TokenStr - TokenStart-1);
|
||||||
SetLength(S,SectionLength);
|
SetString(S, TokenStart, SectionLength);
|
||||||
if SectionLength > 0 then
|
|
||||||
Move(TokenStart^, S[1], SectionLength);
|
|
||||||
FCurtokenString:=FCurtokenString+S;
|
FCurtokenString:=FCurtokenString+S;
|
||||||
Inc(TokenStr);
|
Inc(TokenStr);
|
||||||
end;
|
end;
|
||||||
@ -441,9 +434,7 @@ begin
|
|||||||
Inc(TokenStr);
|
Inc(TokenStr);
|
||||||
until not (TokenStr[0] in ['A'..'Z', 'a'..'z', '0'..'9', '_']);
|
until not (TokenStr[0] in ['A'..'Z', 'a'..'z', '0'..'9', '_']);
|
||||||
SectionLength := TokenStr - TokenStart;
|
SectionLength := TokenStr - TokenStart;
|
||||||
SetLength(FCurTokenString, SectionLength);
|
SetString(FCurTokenString, TokenStart, SectionLength);
|
||||||
if SectionLength > 0 then
|
|
||||||
Move(TokenStart^, FCurTokenString[1], SectionLength);
|
|
||||||
for it := tkTrue to tkNull do
|
for it := tkTrue to tkNull do
|
||||||
if CompareText(CurTokenString, TokenInfos[it]) = 0 then
|
if CompareText(CurTokenString, TokenInfos[it]) = 0 then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user