text stringlengths 0 234 |
|---|
Env : aliased Program.Visibility.Context; |
----------- |
-- Print -- |
----------- |
procedure Print (View : Program.Visibility.View_Array) is |
begin |
for J in View'Range loop |
Print (View (J)); |
end loop; |
end Print; |
----------- |
-- Print -- |
----------- |
procedure Print (View : Program.Visibility.View) is |
use Program.Visibility; |
Name : constant Program.Elements.Defining_Names.Defining_Name_Access := |
Program.Visibility.Name (View); |
begin |
if Name.Assigned then |
Ada.Wide_Wide_Text_IO.Put_Line |
(Name.Image |
& " [" |
& View_Kind'Wide_Wide_Image (View.Kind) |
& "]"); |
else |
Ada.Wide_Wide_Text_IO.Put_Line |
("___ [" |
& View_Kind'Wide_Wide_Image (View.Kind) |
& "]"); |
end if; |
case View.Kind is |
when Enumeration_Type_View => |
Print (Enumeration_Literals (View)); |
when Signed_Integer_Type_View => |
null; |
when Modular_Type_View => |
null; |
when Float_Point_Type_View => |
null; |
when Array_Type_View => |
declare |
Indexes : constant Program.Visibility.View_Array := |
Program.Visibility.Indexes (View); |
begin |
for J in Indexes'Range loop |
Ada.Wide_Wide_Text_IO.Put (" "); |
Print (Indexes (J)); |
end loop; |
Ada.Wide_Wide_Text_IO.Put (" => "); |
Print (Program.Visibility.Component (View)); |
Function Definition: function Immediate_Visible |
Function Body: (Self : access constant Context; |
Region : Item_Offset; |
Symbol : Program.Visibility.Symbol) return View_Array; |
----------------- |
-- Append_Item -- |
----------------- |
procedure Append_Item |
(Self : in out Context'Class; |
Value : Item) is |
begin |
Self.Last_Entity := Self.Last_Entity + 1; |
Self.Data.Append (Value); |
if not Self.Stack.Is_Empty then |
Self.Data (Self.Stack.Last_Element.Enclosing_Item).Region.Append |
(Self.Data.Last_Index); |
end if; |
end Append_Item; |
--------------- |
-- Component -- |
--------------- |
function Component (Self : View) return View is |
Type_Item : Item renames Self.Env.Data (Self.Index); |
begin |
return Self.Env.Get_View (Type_Item.Component); |
end Component; |
----------------------- |
-- Create_Array_Type -- |
----------------------- |
not overriding procedure Create_Array_Type |
(Self : in out Context; |
Symbol : Program.Visibility.Symbol; |
Name : Defining_Name; |
Indexes : View_Array; |
Component : View) |
is |
Value : constant Item := |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.