fcl-passrc: parse property dispid only in dispinterface

git-svn-id: trunk@40638 -
This commit is contained in:
Mattias Gaertner 2018-12-25 07:18:12 +00:00
parent 70cadc7694
commit 5c5a524cd4

View File

@ -5233,13 +5233,14 @@ function TPasParser.ParseProperty(Parent: TPasElement; const AName: String;
end;
var
isArray , ok: Boolean;
isArray , ok, IsClass: Boolean;
ObjKind: TPasObjKind;
begin
Result:=TPasProperty(CreateElement(TPasProperty,AName,Parent,AVisibility));
if IsClassField then
Include(Result.VarModifiers,vmClass);
if (Parent<>nil) and (Parent.ClassType=TPasClassType) then
IsClass:=(Parent<>nil) and (Parent.ClassType=TPasClassType);
if IsClass then
ObjKind:=TPasClassType(Parent).ObjKind
else
ObjKind:=okClass;
@ -5272,6 +5273,8 @@ begin
Result.WriteAccessorName := GetAccessorName(Result,Result.WriteAccessor);
NextToken;
end;
if IsClass and (ObjKind=okDispInterface) then
begin
if CurTokenIsIdentifier('READONLY') then
begin
Result.DispIDReadOnly:=True;
@ -5282,7 +5285,8 @@ begin
NextToken;
Result.DispIDExpr := DoParseExpression(Result,Nil);
end;
if (ObjKind in [okClass]) and CurTokenIsIdentifier('IMPLEMENTS') then
end;
if IsClass and (ObjKind=okClass) and CurTokenIsIdentifier('IMPLEMENTS') then
ParseImplements;
if CurTokenIsIdentifier('STORED') then
begin