diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-02-18 20:09:10 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-02-18 20:09:10 +0100 |
commit | 49328d94b6bfce72ecc76dc1c9d5c612ebdd2d6c (patch) | |
tree | 3a2fc0a4ec5b6dfed2b96f42f6f4da040a7d2ddd /src | |
parent | d080e03a0b3ae146408f9d35d8e24ded17dca045 (diff) | |
download | ghdl-49328d94b6bfce72ecc76dc1c9d5c612ebdd2d6c.tar.gz ghdl-49328d94b6bfce72ecc76dc1c9d5c612ebdd2d6c.tar.bz2 ghdl-49328d94b6bfce72ecc76dc1c9d5c612ebdd2d6c.zip |
parse: detect early use of signature in expressions.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/parse.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 0dd10d9d4..6acd718a5 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -4407,7 +4407,14 @@ package body Parse is when Tok_Identifier | Tok_Double_Less => - return Parse_Name (Allow_Indexes => True); + Res := Parse_Name (Allow_Indexes => True); + if Get_Kind (Res) = Iir_Kind_Signature then + Error_Msg_Parse ("signature not allowed in expression", Res); + return Get_Signature_Prefix (Res); + else + return Res; + end if; + when Tok_Character => Res := Current_Text; Scan; |