mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 00:09:17 +02:00
fcl-js: simplified
git-svn-id: trunk@40203 -
This commit is contained in:
parent
34d11046e0
commit
1bd8e903d7
@ -506,20 +506,13 @@ begin
|
||||
Move(TokenStart^,FCurTokenString[1],Len);
|
||||
// Check if this is a keyword or identifier
|
||||
// !!!: Optimize this!
|
||||
I:=FirstKeyword;
|
||||
While (Result=tjsIdentifier) and (I<=Lastkeyword) do
|
||||
begin
|
||||
if (CurTokenString=TokenInfos[i]) then
|
||||
for i:=FirstKeyword to Lastkeyword do
|
||||
if CurTokenString=TokenInfos[i] then
|
||||
begin
|
||||
Result := i;
|
||||
FCurToken := Result;
|
||||
exit;
|
||||
end;
|
||||
{$Push}
|
||||
{$R-}
|
||||
I:=Succ(I);
|
||||
{$Pop}
|
||||
end
|
||||
end;
|
||||
|
||||
Function TJSScanner.FetchToken: TJSToken;
|
||||
|
Loading…
Reference in New Issue
Block a user