source: trunk/ada-2012/src/semantic/gela-pass_utils.ads@ 398

Last change on this file since 398 was 398, checked in by Maxim Reznik, 5 years ago

Create completion region for package_body

File size: 4.3 KB
Line 
1------------------------------------------------------------------------------
2-- G E L A A S I S --
3-- ASIS implementation for Gela project, a portable Ada compiler --
4-- a portable Ada compiler --
5-- http://gela.ada-ru.org/ --
6-- - - - - - - - - - - - - - - - --
7-- Read copyright and license in gela.ads file --
8------------------------------------------------------------------------------
9
10with Gela.Compilations;
11with Gela.Elements.Compilation_Unit_Declarations;
12with Gela.Elements.Defining_Names;
13with Gela.Elements.Defining_Identifiers;
14with Gela.Elements.Use_Package_Clauses;
15with Gela.Lexical_Types;
16with Gela.Semantic_Types;
17with Gela.Resolve;
18
19package Gela.Pass_Utils is
20 pragma Preelaborate;
21
22 package Resolve renames Gela.Resolve;
23
24 function Add_Name_Create_Region
25 (Comp : Gela.Compilations.Compilation_Access;
26 Env : Gela.Semantic_Types.Env_Index;
27 Symbol : Gela.Lexical_Types.Symbol;
28 Name : Gela.Elements.Defining_Names.Defining_Name_Access;
29 Decl : Gela.Elements.Element_Access)
30 return Gela.Semantic_Types.Env_Index;
31 -- Add (Symbol, Name) to Env
32 -- Check if Name is part of enumeration type declaration
33 -- else create new declarative region
34
35 function Leave_Declarative_Region
36 (Comp : Gela.Compilations.Compilation_Access;
37 Index : Gela.Semantic_Types.Env_Index;
38 Name : Gela.Elements.Defining_Names.Defining_Name_Access)
39 return Gela.Semantic_Types.Env_Index;
40
41 function Create_Completion_Region
42 (Comp : Gela.Compilations.Compilation_Access;
43 Env : Gela.Semantic_Types.Env_Index;
44 Symbol : Gela.Lexical_Types.Symbol)
45 return Gela.Semantic_Types.Env_Index;
46
47 function Add_Names
48 (Comp : Gela.Compilations.Compilation_Access;
49 Env : Gela.Semantic_Types.Env_Index;
50 List : Gela.Lexical_Types.Symbol_List;
51 Names : Gela.Elements.Defining_Identifiers
52 .Defining_Identifier_Sequence_Access)
53 return Gela.Semantic_Types.Env_Index;
54 -- Add (Symbol, Name) from List and Names to Env
55
56 function Add_Use_Package
57 (Comp : Gela.Compilations.Compilation_Access;
58 Env : Gela.Semantic_Types.Env_Index;
59 Node : not null Gela.Elements.Use_Package_Clauses.
60 Use_Package_Clause_Access)
61 return Gela.Semantic_Types.Env_Index;
62 -- Add "use {Symbol};" to Env
63
64 function Add_Names_Create_Region
65 (Comp : Gela.Compilations.Compilation_Access;
66 Env : Gela.Semantic_Types.Env_Index;
67 List : Gela.Lexical_Types.Symbol_List;
68 Names : Gela.Elements.Defining_Identifiers
69 .Defining_Identifier_Sequence_Access)
70 return Gela.Semantic_Types.Env_Index;
71 -- Add (Symbol, Name) from List and Names to Env, then create new
72 -- declarative region
73
74 function Parents_Declarative_Region
75 (Comp : Gela.Compilations.Compilation_Access;
76 Full_Name : Gela.Lexical_Types.Symbol)
77 return Gela.Semantic_Types.Env_Index;
78 -- Return end of declarative region of unit's parent
79
80 function Create_String_Value
81 (Comp : Gela.Compilations.Compilation_Access;
82 Full_Name : Gela.Lexical_Types.Token_Index)
83 return Gela.Semantic_Types.Value_Index;
84 -- Return end of declarative region of unit's parent
85
86 function Create_Numeric_Value
87 (Comp : Gela.Compilations.Compilation_Access;
88 Value : Gela.Lexical_Types.Token_Index)
89 return Gela.Semantic_Types.Value_Index;
90 -- Return end of declarative region of unit's parent
91
92 function Create_Function_Call_Value
93 (Comp : Gela.Compilations.Compilation_Access;
94 Name : Gela.Semantic_Types.Value_Index;
95 Arguments : Gela.Semantic_Types.Value_Index)
96 return Gela.Semantic_Types.Value_Index;
97
98 procedure End_Of_Compilation_Unit_Declaration
99 (Comp : Gela.Compilations.Compilation_Access;
100 Unit : Gela.Elements.Compilation_Unit_Declarations.
101 Compilation_Unit_Declaration_Access;
102 Symbol : Gela.Lexical_Types.Symbol;
103 Env : in out Gela.Semantic_Types.Env_Index);
104
105end Gela.Pass_Utils;
Note: See TracBrowser for help on using the repository browser.