diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-15 07:34:08 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-15 07:34:08 +0200 |
commit | 4b2f88d21cbd1ac51bf62d58aed1ced8bff0c2ef (patch) | |
tree | a187c7ba2f6a564a092b8a23cbbd9b35de89319c | |
parent | 4d12a44e443fbe3285a968e217cde3d27339bb3f (diff) | |
download | ghdl-4b2f88d21cbd1ac51bf62d58aed1ced8bff0c2ef.tar.gz ghdl-4b2f88d21cbd1ac51bf62d58aed1ced8bff0c2ef.tar.bz2 ghdl-4b2f88d21cbd1ac51bf62d58aed1ced8bff0c2ef.zip |
Reformating and comments.
-rw-r--r-- | src/vhdl/iirs.ads | 4 | ||||
-rw-r--r-- | src/vhdl/sem_names.adb | 4 | ||||
-rw-r--r-- | src/vhdl/sem_specs.adb | 16 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads index 94f155ed1..950a40986 100644 --- a/src/vhdl/iirs.ads +++ b/src/vhdl/iirs.ads @@ -1337,7 +1337,7 @@ package Iirs is -- function_specification ::= -- [ PURE | IMPURE ] FUNCTION designator -- subprogram_header - -- [ [ PARAMETER ] ( formal_parameter_list ) ] return type_mark + -- [ [ PARAMETER ] ( formal_parameter_list ) ] RETURN type_mark -- -- designator ::= identifier | operator_symbol -- @@ -1478,7 +1478,7 @@ package Iirs is -- -- interface_function_specification ::= -- [ PURE | IMPURE ] FUNCTION designator - -- [ [ PARAMETER ] ( formal_parameter_list ) ] return type_mark + -- [ [ PARAMETER ] ( formal_parameter_list ) ] RETURN type_mark -- -- Get/Set_Parent (Field0) -- diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 402674376..edea39022 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -1902,7 +1902,7 @@ package body Sem_Names is end if; end Sem_As_Expanded_Name; - -- LRM93 §6.3 + -- LRM93 6.3 -- For a selected name that is used to denote a record element, -- the suffix must be a simple name denoting an element of a -- record object or value. The prefix must be appropriate for the @@ -1927,6 +1927,7 @@ package body Sem_Names is Ptr_Type := Null_Iir; end if; + -- Only records have elements. if not Kind_In (Name_Type, Iir_Kind_Record_Type_Definition, Iir_Kind_Record_Subtype_Definition) then @@ -1936,6 +1937,7 @@ package body Sem_Names is Rec_El := Find_Name_In_List (Get_Elements_Declaration_List (Name_Type), Suffix); if Rec_El = Null_Iir then + -- No such element in the record type. return; end if; diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb index 9e5239bd7..1a9f3f52d 100644 --- a/src/vhdl/sem_specs.adb +++ b/src/vhdl/sem_specs.adb @@ -362,15 +362,14 @@ package body Sem_Specs is end if; end Attribute_A_Decl; - -- IS_DESIGNATORS if true if the entity name list is a list of designators. + -- IS_DESIGNATORS is true if the entity name list is a list of designators. -- Return TRUE if an entity was attributed. - function Sem_Named_Entities - (Scope : Iir; - Name : Iir; - Attr : Iir_Attribute_Specification; - Is_Designators : Boolean; - Check_Defined : Boolean) - return Boolean + function Sem_Named_Entities (Scope : Iir; + Name : Iir; + Attr : Iir_Attribute_Specification; + Is_Designators : Boolean; + Check_Defined : Boolean) + return Boolean is Res : Boolean; @@ -537,6 +536,7 @@ package body Sem_Specs is end loop; end Sem_Named_Entity_Chain; begin + -- The attribute specification was not yet applied. Res := False; -- LRM 5.1 Attribute specification |