text stringlengths 0 234 |
|---|
Definition => F.New_Null_Exclusion (Def), |
Aspects => F.New_Aspect |
(F.New_Name (+"Storage_Pool"), |
F.New_Selected_Name |
(+"Program.Storage_Pools.Pool")))); |
Function Definition: function Prop_List |
Function Body: (Item : Classes.Class) return Classes.Property_Array |
is |
use type Classes.Property_Array; |
Parent_Props : constant Classes.Property_Array := |
Get_Parent_Props (Item, Vector); |
begin |
if Implicit then |
return Skip_Texts (Skip_Tokens (Item.Properties)) |
& Only_Booleans |
(Vector.First_Element.Properties & Parent_Props); |
else |
return Skip_Texts (Skip_Booleans (Item.Properties)) |
& Only_Booleans (Parent_Props); |
end if; |
end Prop_List; |
Root : constant Ada_Pretty.Node_Access := |
F.New_Package_Body |
(F.New_Selected_Name (Package_Name), |
F.New_List (Access_Types, Methods)); |
Unit : constant Ada_Pretty.Node_Access := |
F.New_Compilation_Unit |
(Root, |
Get_With_Clauses); |
Output : Ada.Wide_Wide_Text_IO.File_Type; |
begin |
Open_File (Output, Package_Name, "nodes/", Spec => False); |
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_Factories_Body; |
------------------ |
-- Write_Header -- |
------------------ |
procedure Write_Header (Output : Ada.Wide_Wide_Text_IO.File_Type) is |
begin |
Ada.Wide_Wide_Text_IO.Put_Line |
(Output, "-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>"); |
Ada.Wide_Wide_Text_IO.Put_Line (Output, "--"); |
Ada.Wide_Wide_Text_IO.Put_Line |
(Output, "-- SPDX-License-Identifier: MIT"); |
Ada.Wide_Wide_Text_IO.Put_Line |
(Output, "-- License-Filename: LICENSE"); |
Ada.Wide_Wide_Text_IO.Put_Line |
(Output, |
"-------------------------------------------------------------"); |
Ada.Wide_Wide_Text_IO.New_Line (Output); |
end Write_Header; |
--------------------- |
-- Write_Iterators -- |
--------------------- |
procedure Write_Iterators (Vector : Meta.Read.Class_Vectors.Vector) is |
Package_Name : constant League.Strings.Universal_String := |
+"Internal"; |
F : aliased Ada_Pretty.Factory; |
Visitor : constant Ada_Pretty.Node_Access := |
F.New_Type |
(Name => F.New_Name (+"Visitor"), |
Definition => F.New_Record |
(Parent => F.New_Selected_Name |
(Full_Record_Name (Element_Visitor)), |
Components => F.New_Variable |
(Name => F.New_Name (+"Result"), |
Type_Definition => F.New_Access |
(Modifier => Access_Constant, |
Target => F.New_Name (+"Getter_Array")), |
Initialization => F.New_Name (+"Empty'Access")))); |
function Method_Bodies return Ada_Pretty.Node_Access; |
function Method_Spec |
(Item : Classes.Class) return Ada_Pretty.Node_Access; |
function Child_Args |
(Item : Classes.Class; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.