mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 22:10:51 +02:00
* Make name a little clearer in operator parsing
git-svn-id: trunk@45396 -
This commit is contained in:
parent
6e0a8415df
commit
e928f402fc
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user