Changeset 379


Ignore:
Timestamp:
Jan 7, 2015, 4:22:58 PM (5 years ago)
Author:
Maxim Reznik
Message:

Let Fixed_Operator_Symbol look like operator_symbol

until Down interpretation is calculated and then defining_name is found.

Location:
trunk/ada-2012/src/parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/parser/gela-fix_node_factories.adb

    r349 r379  
    2424               Operator_Symbol_Token));
    2525   begin
     26      Result.Set_Down (0);
     27
    2628      return Gela.Elements.Operator_Symbols.Operator_Symbol_Access (Result);
    2729   end Operator_Symbol;
  • trunk/ada-2012/src/parser/gela-nodes-fixed_operator_symbols.adb

    r324 r379  
     1with Gela.Elements.Defining_Names;
     2with Gela.Interpretations;
     3
    14package body Gela.Nodes.Fixed_Operator_Symbols is
    25
     
    2124      Visiter : in out Gela.Element_Visiters.Visiter'Class)
    2225   is
    23       use type Gela.Lexical_Types.Symbol;
    24       Comp    : constant Gela.Compilations.Compilation_Access :=
    25         Self.Enclosing_Compilation;
    26       Token : constant Gela.Lexical_Types.Token :=
    27         Comp.Get_Token (Self.Operator_Symbol_Token);
     26      use type Gela.Interpretations.Interpretation_Index;
     27
     28      Name : constant Gela.Elements.Defining_Names.Defining_Name_Access :=
     29        Self.Defining_Name;
    2830   begin
    29       if Token.Symbol = Gela.Lexical_Types.No_Symbol then
     31      if Self.Down = 0 or else Name.Assigned then
     32         Visiter.Operator_Symbol (Self);
     33      else
    3034         Visiter.String_Literal (Self);
    31       else
    32          Visiter.Operator_Symbol (Self);
    3335      end if;
    3436   end Visit;
Note: See TracChangeset for help on using the changeset viewer.