source: trunk/ada-2012/src/semantic/gela-int-defining_names.adb@ 359

Last change on this file since 359 was 359, checked in by Maxim Reznik, 6 years ago

Reuse interpretation index

Return the same value for each call of Get_Index with the same arg.

File size: 904 bytes
Line 
1with Gela.Int.Visiters;
2
3package body Gela.Int.Defining_Names is
4
5 ------------
6 -- Create --
7 ------------
8
9 function Create
10 (Down : Gela.Interpretations.Interpretation_Index_Array;
11 Name : Gela.Elements.Defining_Names.Defining_Name_Access)
12 return Defining_Name is
13 begin
14 return (Index => 0,
15 Length => Down'Length,
16 Name => Name,
17 Down => Down);
18 end Create;
19
20 ----------
21 -- Name --
22 ----------
23
24 function Name
25 (Self : Defining_Name)
26 return Gela.Elements.Defining_Names.Defining_Name_Access is
27 begin
28 return Self.Name;
29 end Name;
30
31 -----------
32 -- Visit --
33 -----------
34
35 overriding procedure Visit
36 (Self : Defining_Name;
37 Visiter : access Gela.Int.Visiters.Visiter'Class) is
38 begin
39 Visiter.Defining_Name (Self);
40 end Visit;
41
42end Gela.Int.Defining_Names;
Note: See TracBrowser for help on using the repository browser.