From a94f02122cf1e3b820dc929d0eb91e48af8c5fab Mon Sep 17 00:00:00 2001 From: Ondrej Ille Date: Fri, 2 Apr 2021 23:18:25 +0200 Subject: src: Provide nicer message if Tok_Is is swapped with Tok_Assign for alias. --- src/vhdl/vhdl-parse.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 21ffab509..8c975b604 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -4402,8 +4402,12 @@ package body Vhdl.Parse is Set_Subtype_Indication (Res, Parse_Subtype_Indication); end if; - -- FIXME: nice message if token is ':=' ? - Expect_Scan (Tok_Is); + if Current_Token = Tok_Assign then + Error_Msg_Parse ("alias shall be defined with 'is', not ':='"); + Scan; + else + Expect_Scan (Tok_Is); + end if; Set_Name (Res, Parse_Signature_Name); if Flag_Elocations then -- cgit v1.2.3