source: trunk/ada-2012/src/semantic/gela-int-expressions.adb

Last change on this file was 496, checked in by Maxim Reznik, 4 years ago

Add new property chosen_interpretation

to keep interpretation of Auxiliary_Apply (and may be others nodes latter).
This will simplify work with generic instantination.

  • Property svn:keywords set to Author Date Revision
File size: 1.3 KB
Line 
1with Gela.Int.Visiters;
2
3package body Gela.Int.Expressions is
4
5 ------------
6 -- Create --
7 ------------
8
9 function Create
10 (Down : Gela.Interpretations.Interpretation_Index_Array;
11 Expression_Type : Gela.Semantic_Types.Type_Index;
12 Expression_Kind : Gela.Interpretations.Unknown_Auxiliary_Apply_Kinds)
13 return Expression is
14 begin
15 return (Index => 0,
16 Length => Down'Length,
17 Expression_Type => Expression_Type,
18 Expression_Kind => Expression_Kind,
19 Down => Down);
20 end Create;
21
22 ---------------------
23 -- Expression_Kind --
24 ---------------------
25
26 function Expression_Kind
27 (Self : Expression)
28 return Gela.Interpretations.Unknown_Auxiliary_Apply_Kinds is
29 begin
30 return Self.Expression_Kind;
31 end Expression_Kind;
32
33 ---------------------
34 -- Expression_Type --
35 ---------------------
36
37 function Expression_Type
38 (Self : Expression)
39 return Gela.Semantic_Types.Type_Index is
40 begin
41 return Self.Expression_Type;
42 end Expression_Type;
43
44 -----------
45 -- Visit --
46 -----------
47
48 overriding procedure Visit
49 (Self : Expression;
50 Visiter : access Gela.Int.Visiters.Visiter'Class) is
51 begin
52 Visiter.Expression (Self);
53 end Visit;
54
55end Gela.Int.Expressions;
Note: See TracBrowser for help on using the repository browser.