|
@@ -3103,6 +3103,7 @@ begin
|
|
ConstEl := ParseConstDecl(Declarations);
|
|
ConstEl := ParseConstDecl(Declarations);
|
|
Declarations.Declarations.Add(ConstEl);
|
|
Declarations.Declarations.Add(ConstEl);
|
|
Declarations.Consts.Add(ConstEl);
|
|
Declarations.Consts.Add(ConstEl);
|
|
|
|
+ Engine.FinishScope(stConstDef,ConstEl);
|
|
end;
|
|
end;
|
|
declResourcestring:
|
|
declResourcestring:
|
|
begin
|
|
begin
|
|
@@ -3190,6 +3191,7 @@ begin
|
|
PropEl:=ParseProperty(Declarations,CurtokenString,visDefault,false);
|
|
PropEl:=ParseProperty(Declarations,CurtokenString,visDefault,false);
|
|
Declarations.Declarations.Add(PropEl);
|
|
Declarations.Declarations.Add(PropEl);
|
|
Declarations.Properties.Add(PropEl);
|
|
Declarations.Properties.Add(PropEl);
|
|
|
|
+ Engine.FinishScope(stDeclaration,PropEl);
|
|
end;
|
|
end;
|
|
else
|
|
else
|
|
ParseExcSyntaxError;
|
|
ParseExcSyntaxError;
|
|
@@ -3494,7 +3496,6 @@ begin
|
|
if not ok then
|
|
if not ok then
|
|
ReleaseAndNil(TPasElement(Result));
|
|
ReleaseAndNil(TPasElement(Result));
|
|
end;
|
|
end;
|
|
- Engine.FinishScope(stConstDef,Result);
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
// Starts after the variable name
|
|
// Starts after the variable name
|
|
@@ -4825,7 +4826,6 @@ begin
|
|
if not ok then
|
|
if not ok then
|
|
Result.Release;
|
|
Result.Release;
|
|
end;
|
|
end;
|
|
- Engine.FinishScope(stDeclaration,Result);
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
// Starts after the "begin" token
|
|
// Starts after the "begin" token
|
|
@@ -5718,6 +5718,7 @@ begin
|
|
Cons:=ParseConstDecl(ARec);
|
|
Cons:=ParseConstDecl(ARec);
|
|
Cons.Visibility:=v;
|
|
Cons.Visibility:=v;
|
|
ARec.members.Add(Cons);
|
|
ARec.members.Add(Cons);
|
|
|
|
+ Engine.FinishScope(stConstDef,Cons);
|
|
end;
|
|
end;
|
|
tkVar:
|
|
tkVar:
|
|
begin
|
|
begin
|
|
@@ -5750,6 +5751,7 @@ begin
|
|
ExpectToken(tkIdentifier);
|
|
ExpectToken(tkIdentifier);
|
|
Prop:=ParseProperty(ARec,CurtokenString,v,isClass);
|
|
Prop:=ParseProperty(ARec,CurtokenString,v,isClass);
|
|
Arec.Members.Add(Prop);
|
|
Arec.Members.Add(Prop);
|
|
|
|
+ Engine.FinishScope(stDeclaration,Prop);
|
|
end;
|
|
end;
|
|
tkOperator,
|
|
tkOperator,
|
|
tkProcedure,
|
|
tkProcedure,
|
|
@@ -5977,7 +5979,7 @@ begin
|
|
C:=ParseConstDecl(AType);
|
|
C:=ParseConstDecl(AType);
|
|
C.Visibility:=AVisibility;
|
|
C.Visibility:=AVisibility;
|
|
AType.Members.Add(C);
|
|
AType.Members.Add(C);
|
|
- Engine.FinishScope(stDeclaration,C);
|
|
|
|
|
|
+ Engine.FinishScope(stConstDef,C);
|
|
// Writeln(CurtokenString,' ',TokenInfos[Curtoken]);
|
|
// Writeln(CurtokenString,' ',TokenInfos[Curtoken]);
|
|
NextToken;
|
|
NextToken;
|
|
Done:=(Curtoken<>tkIdentifier) or CheckVisibility(CurtokenString,AVisibility);
|
|
Done:=(Curtoken<>tkIdentifier) or CheckVisibility(CurtokenString,AVisibility);
|
|
@@ -5996,6 +5998,7 @@ Var
|
|
CurSection : TSectionType;
|
|
CurSection : TSectionType;
|
|
haveClass : Boolean;
|
|
haveClass : Boolean;
|
|
LastToken: TToken;
|
|
LastToken: TToken;
|
|
|
|
+ PropEl: TPasProperty;
|
|
|
|
|
|
begin
|
|
begin
|
|
CurSection:=stNone;
|
|
CurSection:=stNone;
|
|
@@ -6064,7 +6067,9 @@ begin
|
|
if not haveClass then
|
|
if not haveClass then
|
|
SaveComments;
|
|
SaveComments;
|
|
ExpectIdentifier;
|
|
ExpectIdentifier;
|
|
- AType.Members.Add(ParseProperty(AType,CurtokenString,CurVisibility,HaveClass));
|
|
|
|
|
|
+ PropEl:=ParseProperty(AType,CurtokenString,CurVisibility,HaveClass);
|
|
|
|
+ AType.Members.Add(PropEl);
|
|
|
|
+ Engine.FinishScope(stDeclaration,PropEl);
|
|
HaveClass:=False;
|
|
HaveClass:=False;
|
|
end;
|
|
end;
|
|
tkSquaredBraceOpen:
|
|
tkSquaredBraceOpen:
|