|
@@ -8200,12 +8200,16 @@ var
|
|
aModule: TPasModule;
|
|
aModule: TPasModule;
|
|
|
|
|
|
function CreateOrContinueSection(const PropName: string; var Section: TPasSection;
|
|
function CreateOrContinueSection(const PropName: string; var Section: TPasSection;
|
|
- SectionClass: TPasSectionClass): boolean;
|
|
|
|
|
|
+ SectionClass: TPasSectionClass; MustExist: boolean): boolean;
|
|
var
|
|
var
|
|
SubObj: TJSONObject;
|
|
SubObj: TJSONObject;
|
|
begin
|
|
begin
|
|
if not ReadObject(Obj,PropName,SubObj,aModule) then
|
|
if not ReadObject(Obj,PropName,SubObj,aModule) then
|
|
- RaiseMsg(20180308142146,aModule);
|
|
|
|
|
|
+ begin
|
|
|
|
+ if MustExist then
|
|
|
|
+ RaiseMsg(20180308142146,aModule);
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
if Section=nil then
|
|
if Section=nil then
|
|
Section:=TPasSection(CreateElement(SectionClass,'',aModule));
|
|
Section:=TPasSection(CreateElement(SectionClass,'',aModule));
|
|
ReadSection(SubObj,Section,aContext);
|
|
ReadSection(SubObj,Section,aContext);
|
|
@@ -8259,7 +8263,7 @@ begin
|
|
// start or continue ProgramSection
|
|
// start or continue ProgramSection
|
|
Prog:=TPasProgram(aModule);
|
|
Prog:=TPasProgram(aModule);
|
|
if not CreateOrContinueSection('Program',TPasSection(Prog.ProgramSection),
|
|
if not CreateOrContinueSection('Program',TPasSection(Prog.ProgramSection),
|
|
- TProgramSection) then
|
|
|
|
|
|
+ TProgramSection,true) then
|
|
exit; // pending uses interfaces -> pause
|
|
exit; // pending uses interfaces -> pause
|
|
end
|
|
end
|
|
else if aModule.ClassType=TPasLibrary then
|
|
else if aModule.ClassType=TPasLibrary then
|
|
@@ -8267,7 +8271,7 @@ begin
|
|
// start or continue LibrarySection
|
|
// start or continue LibrarySection
|
|
Lib:=TPasLibrary(aModule);
|
|
Lib:=TPasLibrary(aModule);
|
|
if not CreateOrContinueSection('Library',TPasSection(Lib.LibrarySection),
|
|
if not CreateOrContinueSection('Library',TPasSection(Lib.LibrarySection),
|
|
- TLibrarySection) then
|
|
|
|
|
|
+ TLibrarySection,true) then
|
|
exit; // pending uses interfaces -> pause
|
|
exit; // pending uses interfaces -> pause
|
|
end
|
|
end
|
|
else
|
|
else
|
|
@@ -8277,12 +8281,12 @@ begin
|
|
begin
|
|
begin
|
|
// start or continue unit Interface
|
|
// start or continue unit Interface
|
|
if not CreateOrContinueSection('Interface',TPasSection(aModule.InterfaceSection),
|
|
if not CreateOrContinueSection('Interface',TPasSection(aModule.InterfaceSection),
|
|
- TInterfaceSection) then
|
|
|
|
|
|
+ TInterfaceSection,true) then
|
|
exit; // pending uses interfaces -> pause
|
|
exit; // pending uses interfaces -> pause
|
|
end;
|
|
end;
|
|
// start or continue unit Implementation
|
|
// start or continue unit Implementation
|
|
if not CreateOrContinueSection('Implementation',TPasSection(aModule.ImplementationSection),
|
|
if not CreateOrContinueSection('Implementation',TPasSection(aModule.ImplementationSection),
|
|
- TImplementationSection) then
|
|
|
|
|
|
+ TImplementationSection,false) then
|
|
exit; // pending uses interfaces -> pause
|
|
exit; // pending uses interfaces -> pause
|
|
end;
|
|
end;
|
|
if (Obj.Find('Init')<>nil)
|
|
if (Obj.Find('Init')<>nil)
|