fcl-js: simplified

git-svn-id: trunk@40203 -
This commit is contained in:
Mattias Gaertner 2018-11-03 21:36:36 +00:00
parent 34d11046e0
commit 1bd8e903d7

View File

@ -506,20 +506,13 @@ begin
Move(TokenStart^,FCurTokenString[1],Len); Move(TokenStart^,FCurTokenString[1],Len);
// Check if this is a keyword or identifier // Check if this is a keyword or identifier
// !!!: Optimize this! // !!!: Optimize this!
I:=FirstKeyword; for i:=FirstKeyword to Lastkeyword do
While (Result=tjsIdentifier) and (I<=Lastkeyword) do if CurTokenString=TokenInfos[i] then
begin
if (CurTokenString=TokenInfos[i]) then
begin begin
Result := i; Result := i;
FCurToken := Result; FCurToken := Result;
exit; exit;
end; end;
{$Push}
{$R-}
I:=Succ(I);
{$Pop}
end
end; end;
Function TJSScanner.FetchToken: TJSToken; Function TJSScanner.FetchToken: TJSToken;