source: trunk/ada-2012/src/parser/gela-nodes-fixed_operator_symbols.adb@ 379

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

Let Fixed_Operator_Symbol look like operator_symbol

until Down interpretation is calculated and then defining_name is found.

File size: 975 bytes
Line 
1with Gela.Elements.Defining_Names;
2with Gela.Interpretations;
3
4package body Gela.Nodes.Fixed_Operator_Symbols is
5
6 --------------------------
7 -- String_Literal_Token --
8 --------------------------
9
10 overriding function String_Literal_Token
11 (Self : Operator_Symbol)
12 return Gela.Lexical_Types.Token_Count
13 is
14 begin
15 return Self.Operator_Symbol_Token;
16 end String_Literal_Token;
17
18 -----------
19 -- Visit --
20 -----------
21
22 overriding procedure Visit
23 (Self : access Operator_Symbol;
24 Visiter : in out Gela.Element_Visiters.Visiter'Class)
25 is
26 use type Gela.Interpretations.Interpretation_Index;
27
28 Name : constant Gela.Elements.Defining_Names.Defining_Name_Access :=
29 Self.Defining_Name;
30 begin
31 if Self.Down = 0 or else Name.Assigned then
32 Visiter.Operator_Symbol (Self);
33 else
34 Visiter.String_Literal (Self);
35 end if;
36 end Visit;
37
38end Gela.Nodes.Fixed_Operator_Symbols;
Note: See TracBrowser for help on using the repository browser.