text
stringlengths
0
234
function Parent (Self : in Item) return Declaration.of_package.view
is
begin
return Self.Parent;
end Parent;
function child_Packages (Self : in Item'Class) return Declaration.of_package.Vector
is
begin
return Self.child_Packages;
end child_Packages;
function child_Package (Self : in Item'Class; Named : in String) return Declaration.of_package.view
is
begin
for Each of Self.child_Packages
loop
if Each.Name = Named
then
return Each;
end if;
end loop;
return null;
end child_Package;
procedure add_Child (Self : in out Item; Child : in Declaration.of_package.View)
is
begin
Self.child_Packages.append (Child);
end add_Child;
function find (Self : in Item; Named : in Identifier) return AdaM.a_Type.view
is
begin
for Each of Self.Children.all
loop
-- put_Line ("--- find type in package " & (+Self.Name) & " --- Tag => " & ada.Tags.External_Tag (Each.all'Tag));
if Each.all in AdaM.a_Type.item'Class
then
if Each.Name = Named
then
return AdaM.a_Type.view (Each);
end if;
end if;
end loop;
put_Line (String (Named) & " NOT FOUND in package " & (+Self.Name));
return null;
end find;
function find (Self : in Item; Named : in Identifier) return AdaM.Declaration.of_exception.view
is
begin
for Each of Self.Children.all
loop
-- put_Line ("--- find type in package " & (+Self.Name) & " --- Tag => " & ada.Tags.External_Tag (Each.all'Tag));
if Each.all in AdaM.Declaration.of_exception.item'Class
then
if Each.Name = Named
then
return AdaM.Declaration.of_exception.view (Each);
end if;
end if;
end loop;
put_Line (String (Named) & " NOT FOUND in package " & (+Self.Name));
return null;
end find;
function full_Name (Self : in Item) return Identifier
is
begin
if Self.Parent = null -- Is the Standard package.
then
return "Standard";
end if;
if Self.Parent.Name = "Standard"
then
return +Self.Name;
else