Ignore:
Timestamp:
Feb 16, 2015, 6:35:11 AM (5 years ago)
Author:
Maxim Reznik
Message:

Make distinction between index and disriminant constraint

File:
1 edited

Legend:

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

    r351 r399  
    22with Asis.Exceptions;
    33with Asis.Implementation;
     4with Asis.Extensions.Flat_Kinds;
    45
    56with Gela.Element_Visiters;
     
    116117              Composite_Constraint_Access)
    117118         is
    118             pragma Unreferenced (Node);
    119          begin
    120             Self.Result := Self.Flags (Is_Association);
     119            use type Asis.Extensions.Flat_Kinds.Element_Flat_Kind;
     120
     121            Kind : constant Asis.Extensions.Flat_Kinds.Element_Flat_Kind :=
     122              Asis.Extensions.Flat_Kinds.Flat_Kind
     123                ((Data => Gela.Elements.Element_Access (Node)));
     124         begin
     125            if Kind = Asis.Extensions.Flat_Kinds.An_Index_Constraint then
     126               Self.Result := Self.Flags (Is_Association);
     127            else
     128               Self.Result := False;
     129            end if;
    121130         end Composite_Constraint;
    122131
Note: See TracChangeset for help on using the changeset viewer.