-- Structure to define source data
type Source_Data is record
+ Initialized : Boolean := False;
+ -- Set to True when Source_Data is completely initialized
+
Project : Project_Id := No_Project;
-- Project of the source
-- file). Index is 0 if there is either no unit or a single one, and
-- starts at 1 when there are multiple units
+ Compilable : Yes_No_Unknown := Unknown;
+ -- Updated at the first call to Is_Compilable. Yes if source file is
+ -- compilable.
+
+ In_The_Queue : Boolean := False;
+ -- True if the source has been put in the queue
+
Locally_Removed : Boolean := False;
-- True if the source has been "excluded"
end record;
No_Source_Data : constant Source_Data :=
- (Project => No_Project,
+ (Initialized => False,
+ Project => No_Project,
Location => No_Location,
Source_Dir_Rank => 0,
Language => No_Language_Index,
Unit => No_Unit_Index,
Index => 0,
Locally_Removed => False,
+ Compilable => Unknown,
+ In_The_Queue => False,
Replaced_By => No_Source,
File => No_File,
Display_File => No_File,
-- Return the object directory to use for the project. This depends on
-- whether we have a library project or a standard project. This function
-- might return No_Name when no directory applies.
- -- If we have a a library project file and Including_Libraries is True then
+ -- If we have a library project file and Including_Libraries is True then
-- the library dir is returned instead of the object dir.
-- If Only_If_Ada is True, then No_Name will be returned when the project
-- doesn't Ada sources.
type Error_Handler is access procedure
(Project : Project_Id;
Is_Warning : Boolean);
- -- This warngs when an error was found when parsing a project. The error
+ -- This warns when an error was found when parsing a project. The error
-- itself is handled through Prj.Err (and Prj.Err.Finalize should be called
-- to actually print the error). This ensures that duplicate error messages
-- are always correctly removed, that errors msgs are sorted, and that all