mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 19:49:22 +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);
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user