text stringlengths 0 234 |
|---|
(+"and", |
F.New_Selected_Name (Full_Record_Name (Item.Name)))))); |
Aspec_List : constant Ada_Pretty.Node_Access_Array := |
(F.New_Name (+"Is_Part_Of_Implicit"), |
F.New_Infix (+"or", F.New_Name (+"Is_Part_Of_Inherited")), |
F.New_Infix (+"or", F.New_Name (+"Is_Part_Of_Instance"))); |
Create_Implicit : constant Ada_Pretty.Node_Access := |
F.New_Subprogram_Declaration |
(Specification => F.New_Subprogram_Specification |
(Name => F.New_Name (+"Create"), |
Parameters => Prop_Parameters |
(Only_Objects (Item.Properties & Parent_Props) & |
Bool_Props & Only_Booleans (Parent_Props)), |
Result => Implicit_Name), |
Aspects => F.New_Aspect |
(Name => F.New_Name (+"Pre"), |
Value => F.New_List (Aspec_List))); |
Public_Part : constant Ada_Pretty.Node_Access := F.New_List |
((Pure, Public_Node, Create_Node, Public_Implicit, Create_Implicit)); |
Private_Part : constant Ada_Pretty.Node_Access := |
F.New_List ((Base_List, Node_List, Implicit_List)); |
Root : constant Ada_Pretty.Node_Access := |
F.New_Package |
(F.New_Selected_Name (Package_Name), Public_Part, Private_Part); |
With_Clauses_1 : constant Ada_Pretty.Node_Access := |
Get_With_Clauses |
(F'Access, Item, |
With_List => False, |
With_Parent => False); |
With_Clauses_2 : constant not null Ada_Pretty.Node_Access := |
F.New_With (F.New_Selected_Name (Element_Package_Name)); |
With_Clauses_3 : constant not null Ada_Pretty.Node_Access := |
F.New_With (F.New_Selected_Name (Get_Package_Name (Element_Visitor))); |
With_Clauses : constant Ada_Pretty.Node_Access := |
F.New_List |
(F.New_List (With_Clauses_1, With_Clauses_2), With_Clauses_3); |
Unit : constant Ada_Pretty.Node_Access := |
F.New_Compilation_Unit (Root, With_Clauses); |
Output : Ada.Wide_Wide_Text_IO.File_Type; |
begin |
Open_File (Output, Package_Name, "nodes/"); |
Ada.Wide_Wide_Text_IO.Put_Line |
(Output, |
F.To_Text (Unit).Join (Ada.Characters.Wide_Wide_Latin_1.LF) |
.To_Wide_Wide_String); |
Ada.Wide_Wide_Text_IO.Close (Output); |
end Write_One_Node; |
------------------------- |
-- Write_One_Node_Body -- |
------------------------- |
procedure Write_One_Node_Body |
(Vector : Meta.Read.Class_Vectors.Vector; |
Item : Meta.Classes.Class) |
is |
use type Classes.Property_Array; |
F : aliased Ada_Pretty.Factory; |
function Prop_Parameters is new Generic_List_Reduce |
(Classes.Property, Classes.Property_Array, Prop_Parameter, F); |
function Prop_Arguments is new Generic_List_Reduce |
(Classes.Property, Classes.Property_Array, Prop_Argument, F); |
function Prop_Set_Enclosing |
(F : aliased in out Ada_Pretty.Factory; |
Prop : Classes.Property) return Ada_Pretty.Node_Access; |
function Prop_Check |
(F : aliased in out Ada_Pretty.Factory; |
Name : League.Strings.Universal_String) return Ada_Pretty.Node_Access; |
function Prop_Checks is new Generic_List_Reduce |
(League.Strings.Universal_String, String_Array, Prop_Check, F); |
generic |
Type_Name : Ada_Pretty.Node_Access; |
Is_Node : Boolean; |
function Prop_Getter |
(F : aliased in out Ada_Pretty.Factory; |
Prop : Classes.Property) return Ada_Pretty.Node_Access; |
Unreferenced : constant Ada_Pretty.Node_Access := F.New_Pragma |
(Name => F.New_Name (+"Unreferenced"), |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.