Ignore:
Timestamp:
Feb 15, 2015, 3:00:58 PM (5 years ago)
Author:
Maxim Reznik
Message:

Create completion region for package_body

File:
1 edited

Legend:

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

    r397 r398  
    119119with Gela.Elements.Membership_Tests;
    120120with Gela.Elements.Modular_Type_Definitions;
     121with Gela.Elements.Names;
    121122with Gela.Elements.Null_Components;
    122123with Gela.Elements.Null_Literals;
     
    231232   overriding procedure Allocator
    232233     (Self : in out Visiter;
    233       Node : not null Gela.Elements.Allocators.Allocator_Access)
    234    is null;
     234      Node : not null Gela.Elements.Allocators.Allocator_Access);
    235235
    236236   overriding procedure Anonymous_Access_To_Function_Definition
     
    810810   overriding procedure Membership_Test
    811811     (Self : in out Visiter;
    812       Node : not null Gela.Elements.Membership_Tests.Membership_Test_Access)
    813    is null;
     812      Node : not null Gela.Elements.Membership_Tests.Membership_Test_Access);
    814813
    815814   overriding procedure Modular_Type_Definition
     
    878877     (Self : in out Visiter;
    879878      Node : not null Gela.Elements.Package_Body_Stubs.
    880         Package_Body_Stub_Access)
    881    is null;
     879        Package_Body_Stub_Access);
    882880
    883881   overriding procedure Package_Declaration
     
    983981     (Self : in out Visiter;
    984982      Node : not null Gela.Elements.Qualified_Expressions.
    985         Qualified_Expression_Access)
    986    is null;
     983        Qualified_Expression_Access);
    987984
    988985   overriding procedure Quantified_Expression
     
    1000997     (Self : in out Visiter;
    1001998      Node : not null Gela.Elements.Range_Attribute_References.
    1002         Range_Attribute_Reference_Access)
    1003    is null;
     999        Range_Attribute_Reference_Access);
    10041000
    10051001   overriding procedure Range_Attribute_Reference_Dr
     
    11191115   overriding procedure Task_Body_Stub
    11201116     (Self : in out Visiter;
    1121       Node : not null Gela.Elements.Task_Body_Stubs.Task_Body_Stub_Access)
    1122    is null;
     1117      Node : not null Gela.Elements.Task_Body_Stubs.Task_Body_Stub_Access);
    11231118
    11241119   overriding procedure Task_Definition
     
    12031198   end Access_To_Object_Definition;
    12041199
     1200   overriding procedure Allocator
     1201     (Self : in out Visiter;
     1202      Node : not null Gela.Elements.Allocators.Allocator_Access)
     1203   is
     1204      Name : constant Gela.Elements.Names.Name_Access :=
     1205        Node.Subtype_Or_Expression;
     1206   begin
     1207      Name.Visit (Self);
     1208
     1209      case Self.Result is
     1210         when A_Qualified_Expression =>
     1211            Self.Result := An_Allocation_From_Qualified_Expression;
     1212         when others =>
     1213            Self.Result := An_Allocation_From_Subtype;
     1214      end case;
     1215   end Allocator;
     1216
    12051217   overriding procedure Anonymous_Access_To_Object_Definition
    12061218     (Self : in out Visiter;
     
    12421254   is
    12431255      package X renames Gela.Lexical_Types.Predefined_Symbols;
    1244 
    1245       Id : constant Gela.Elements.Identifiers.Identifier_Access :=
     1256      use type Gela.Lexical_Types.Token_Count;
     1257
     1258      Id    : constant Gela.Elements.Identifiers.Identifier_Access :=
    12461259        Node.Attribute_Designator_Identifier;
    1247       Comp    : constant Gela.Compilations.Compilation_Access :=
     1260      Comp  : constant Gela.Compilations.Compilation_Access :=
    12481261        Node.Enclosing_Compilation;
    1249       Token : constant Gela.Lexical_Types.Token :=
    1250         Comp.Get_Token (Id.Identifier_Token);
    1251       Map : constant array (Gela.Lexical_Types.Symbol range
     1262      Token : Gela.Lexical_Types.Token;
     1263      Map   : constant array (Gela.Lexical_Types.Symbol range
    12521264                              X.Access_Symbol .. X.Write) of Element_Flat_Kind
    12531265        :=
     
    13471359           X.Write => A_Write_Attribute);
    13481360   begin
     1361      if Node.Range_Token /= 0 then
     1362         Self.Result := A_Range_Attribute;
     1363
     1364         return;
     1365      end if;
     1366
     1367      Token := Comp.Get_Token (Id.Identifier_Token);
     1368
    13491369      if Token.Symbol in Map'Range then
    13501370         Self.Result := Map (Token.Symbol);
     
    17931813   end Loop_Statement;
    17941814
     1815   overriding procedure Membership_Test
     1816     (Self : in out Visiter;
     1817      Node : not null Gela.Elements.Membership_Tests.Membership_Test_Access)
     1818   is
     1819      use type Gela.Lexical_Types.Token_Count;
     1820   begin
     1821      if Node.Not_Token = 0 then
     1822         Self.Result := An_In_Range_Membership_Test;
     1823      else
     1824         Self.Result := A_Not_In_Range_Membership_Test;
     1825      end if;
     1826   end Membership_Test;
     1827
    17951828   overriding procedure Null_Component
    17961829     (Self : in out Visiter;
     
    18961929      Self.Result := A_Package_Body_Declaration;
    18971930   end Package_Body;
     1931
     1932   overriding procedure Package_Body_Stub
     1933     (Self : in out Visiter;
     1934      Node : not null Gela.Elements.Package_Body_Stubs.
     1935        Package_Body_Stub_Access)
     1936   is
     1937      pragma Unreferenced (Node);
     1938   begin
     1939      Self.Result := A_Package_Body_Stub;
     1940   end Package_Body_Stub;
    18981941
    18991942   overriding procedure Package_Declaration
     
    20882131   end Protected_Definition;
    20892132
     2133   overriding procedure Qualified_Expression
     2134     (Self : in out Visiter;
     2135      Node : not null Gela.Elements.Qualified_Expressions.
     2136        Qualified_Expression_Access)
     2137   is
     2138      pragma Unreferenced (Node);
     2139   begin
     2140      Self.Result := A_Qualified_Expression;
     2141   end Qualified_Expression;
     2142
     2143   overriding procedure Range_Attribute_Reference
     2144     (Self : in out Visiter;
     2145      Node : not null Gela.Elements.Range_Attribute_References.
     2146        Range_Attribute_Reference_Access)
     2147   is
     2148      pragma Unreferenced (Node);
     2149   begin
     2150      Self.Result := A_Range_Attribute_Reference;
     2151   end Range_Attribute_Reference;
     2152
    20902153   overriding procedure Record_Aggregate
    20912154     (Self : in out Visiter;
     
    22792342   end Task_Body;
    22802343
     2344   overriding procedure Task_Body_Stub
     2345     (Self : in out Visiter;
     2346      Node : not null Gela.Elements.Task_Body_Stubs.Task_Body_Stub_Access)
     2347   is
     2348      pragma Unreferenced (Node);
     2349   begin
     2350      Self.Result := A_Task_Body_Stub;
     2351   end Task_Body_Stub;
     2352
    22812353   overriding procedure Task_Definition
    22822354     (Self : in out Visiter;
Note: See TracChangeset for help on using the changeset viewer.