diff options
author | Tristan Gingold | 2015-05-12 20:06:22 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-05-12 20:06:22 +0200 |
commit | e8e5c3d2ab5783d65fcd7a33a7b35c103179ece8 (patch) | |
tree | 7705d74b45e55239f58242f1ce5d591ebfe7aa09 /src/vhdl/iirs.adb | |
parent | 1effd3eb564f49a9b8e3543dfdbb121c6e1e9b73 (diff) | |
download | ghdl-e8e5c3d2ab5783d65fcd7a33a7b35c103179ece8.tar.gz ghdl-e8e5c3d2ab5783d65fcd7a33a7b35c103179ece8.tar.bz2 ghdl-e8e5c3d2ab5783d65fcd7a33a7b35c103179ece8.zip |
Add context declaration and reference (vhdl 2008).
Diffstat (limited to 'src/vhdl/iirs.adb')
-rw-r--r-- | src/vhdl/iirs.adb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb index 4340b9c..99b8756 100644 --- a/src/vhdl/iirs.adb +++ b/src/vhdl/iirs.adb @@ -243,6 +243,7 @@ package body Iirs is | Iir_Kind_Error | Iir_Kind_Library_Clause | Iir_Kind_Use_Clause + | Iir_Kind_Context_Reference | Iir_Kind_Null_Literal | Iir_Kind_String_Literal8 | Iir_Kind_Simple_Aggregate @@ -297,6 +298,7 @@ package body Iirs is | Iir_Kind_Package_Declaration | Iir_Kind_Package_Body | Iir_Kind_Configuration_Declaration + | Iir_Kind_Context_Declaration | Iir_Kind_Unit_Declaration | Iir_Kind_Library_Declaration | Iir_Kind_Attribute_Declaration @@ -2311,7 +2313,23 @@ package body Iirs is Set_Field3 (Target, Chain); end Set_Use_Clause_Chain; - function Get_Selected_Name (Target : Iir_Use_Clause) return Iir is + function Get_Context_Reference_Chain (Target : Iir) return Iir is + begin + pragma Assert (Target /= Null_Iir); + pragma Assert (Has_Context_Reference_Chain (Get_Kind (Target)), + "no field Context_Reference_Chain"); + return Get_Field3 (Target); + end Get_Context_Reference_Chain; + + procedure Set_Context_Reference_Chain (Target : Iir; Chain : Iir) is + begin + pragma Assert (Target /= Null_Iir); + pragma Assert (Has_Context_Reference_Chain (Get_Kind (Target)), + "no field Context_Reference_Chain"); + Set_Field3 (Target, Chain); + end Set_Context_Reference_Chain; + + function Get_Selected_Name (Target : Iir) return Iir is begin pragma Assert (Target /= Null_Iir); pragma Assert (Has_Selected_Name (Get_Kind (Target)), @@ -2319,7 +2337,7 @@ package body Iirs is return Get_Field1 (Target); end Get_Selected_Name; - procedure Set_Selected_Name (Target : Iir_Use_Clause; Name : Iir) is + procedure Set_Selected_Name (Target : Iir; Name : Iir) is begin pragma Assert (Target /= Null_Iir); pragma Assert (Has_Selected_Name (Get_Kind (Target)), |