diff options
Diffstat (limited to 'src/vhdl/elocations.adb')
-rw-r--r-- | src/vhdl/elocations.adb | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/vhdl/elocations.adb b/src/vhdl/elocations.adb index c63a35c59..6ee8d0c2f 100644 --- a/src/vhdl/elocations.adb +++ b/src/vhdl/elocations.adb @@ -175,12 +175,6 @@ package body Elocations is | Iir_Kind_Waveform_Element | Iir_Kind_Conditional_Waveform | Iir_Kind_Conditional_Expression - | Iir_Kind_Association_Element_By_Expression - | Iir_Kind_Association_Element_By_Individual - | Iir_Kind_Association_Element_Open - | Iir_Kind_Association_Element_Package - | Iir_Kind_Association_Element_Type - | Iir_Kind_Association_Element_Subprogram | Iir_Kind_Choice_By_Range | Iir_Kind_Choice_By_Expression | Iir_Kind_Choice_By_Others @@ -374,6 +368,12 @@ package body Elocations is | Iir_Kind_Attribute_Name => return Format_None; when Iir_Kind_Library_Clause + | Iir_Kind_Association_Element_By_Expression + | Iir_Kind_Association_Element_By_Individual + | Iir_Kind_Association_Element_Open + | Iir_Kind_Association_Element_Package + | Iir_Kind_Association_Element_Type + | Iir_Kind_Association_Element_Subprogram | Iir_Kind_Attribute_Specification | Iir_Kind_Anonymous_Type_Declaration | Iir_Kind_Attribute_Declaration @@ -626,4 +626,20 @@ package body Elocations is Set_Field2 (N, Loc); end Set_Port_Map_Location; + function Get_Arrow_Location (N : Iir) return Location_Type is + begin + pragma Assert (N /= Null_Iir); + pragma Assert (Has_Arrow_Location (Get_Kind (N)), + "no field Arrow_Location"); + return Get_Field1 (N); + end Get_Arrow_Location; + + procedure Set_Arrow_Location (N : Iir; Loc : Location_Type) is + begin + pragma Assert (N /= Null_Iir); + pragma Assert (Has_Arrow_Location (Get_Kind (N)), + "no field Arrow_Location"); + Set_Field1 (N, Loc); + end Set_Arrow_Location; + end Elocations; |