From 49328d94b6bfce72ecc76dc1c9d5c612ebdd2d6c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 18 Feb 2016 20:09:10 +0100 Subject: parse: detect early use of signature in expressions. --- src/vhdl/parse.adb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3