Changeset 400


Ignore:
Timestamp:
Feb 16, 2015, 12:05:24 PM (5 years ago)
Author:
Maxim Reznik
Message:

fix Access_Type_Kind and add next test

Location:
trunk/ada-2012
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/asis/asis-elements.adb

    r399 r400  
    7171      return Asis.Access_Type_Kinds
    7272   is
    73    begin
    74       if Assigned (Definition) then
    75          Raise_Not_Implemented ("");
    76          return Not_An_Access_Type_Definition;
     73      Map : constant array (F.An_Access_Type_Definition)
     74        of Asis.Access_Type_Kinds :=
     75          (F.A_Pool_Specific_Access_To_Variable =>
     76             Asis.A_Pool_Specific_Access_To_Variable,
     77           F.An_Access_To_Variable =>
     78             Asis.An_Access_To_Variable,
     79           F.An_Access_To_Constant =>
     80             Asis.An_Access_To_Constant,
     81           F.An_Access_To_Procedure =>
     82             Asis.An_Access_To_Procedure,
     83           F.An_Access_To_Protected_Procedure =>
     84             Asis.An_Access_To_Protected_Procedure,
     85           F.An_Access_To_Function =>
     86             Asis.An_Access_To_Function,
     87           F.An_Access_To_Protected_Function =>
     88             Asis.An_Access_To_Protected_Function);
     89
     90      Kind : constant Asis.Extensions.Flat_Kinds.Element_Flat_Kind :=
     91        Asis.Extensions.Flat_Kinds.Flat_Kind (Definition);
     92   begin
     93      if Kind in Map'Range then
     94         return Map (Kind);
    7795      else
    7896         return Not_An_Access_Type_Definition;
  • trunk/ada-2012/src/asis/asis-extensions-flat_kinds.adb

    r399 r400  
    11941194   is
    11951195      use type Gela.Lexical_Types.Token_Count;
     1196      use type Gela.Lexical_Types.Token_Kind;
     1197
     1198      Comp  : constant Gela.Compilations.Compilation_Access :=
     1199        Node.Enclosing_Compilation;
     1200      Token : Gela.Lexical_Types.Token;
    11961201   begin
    11971202      if Node.Constant_Token = 0 then
    1198          Self.Result := An_Anonymous_Access_To_Variable;
     1203         Self.Result := A_Pool_Specific_Access_To_Variable;
     1204         return;
     1205      end if;
     1206
     1207      Token := Comp.Get_Token (Node.Constant_Token);
     1208
     1209      if Token.Kind = Gela.Lexical_Types.All_Token then
     1210         Self.Result := An_Access_To_Variable;
    11991211      else
    1200          Self.Result := An_Anonymous_Access_To_Constant;
     1212         Self.Result := An_Access_To_Constant;
    12011213      end if;
    12021214   end Access_To_Object_Definition;
  • trunk/ada-2012/tests/asis/asis2xml.gpl/list.txt

    r399 r400  
    66./A/A29003A.ADA 470204489
    77./A/A2A031A.ADA 84672784
     8./A/A33003A.ADA 3558726738
Note: See TracChangeset for help on using the changeset viewer.