* Make name a little clearer in operator parsing

git-svn-id: trunk@45396 -
This commit is contained in:
michael 2020-05-17 07:55:36 +00:00
parent 6e0a8415df
commit e928f402fc

View File

@ -6511,14 +6511,14 @@ var
end;
var
N,Name: String;
OperatorTypeName,Name: String;
PC : TPTreeElement;
Ot : TOperatorType;
IsTokenBased , ok: Boolean;
j, i: Integer;
begin
N:='';
OperatorTypeName:='';
NameParts:=nil;
Result:=nil;
ok:=false;
@ -6535,13 +6535,13 @@ begin
else
begin
OT:=TPasOperator.NameToOperatorType(CurTokenString);
N:=CurTokenString;
OperatorTypeName:=CurTokenString;
// Case Class operator TMyRecord.+
if (OT=otUnknown) then
begin
NextToken;
if CurToken<>tkDot then
ParseExc(nErrUnknownOperatorType,SErrUnknownOperatorType,[N]);
ParseExc(nErrUnknownOperatorType,SErrUnknownOperatorType,[OperatorTypeName]);
NextToken;
IsTokenBased:=CurToken<>tkIdentifier;
if IsTokenBased then
@ -6553,8 +6553,8 @@ begin
if (ot=otUnknown) then
ParseExc(nErrUnknownOperatorType,SErrUnknownOperatorType,[CurTokenString]);
Name:=OperatorNames[Ot];
if N<>'' then
Name:=N+'.'+Name;
if OperatorTypeName<>'' then
Name:=OperatorTypeName+'.'+Name;
NamePos:=CurTokenPos;
end;
ptAnonymousProcedure,ptAnonymousFunction: