aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Ille <ondrej.ille@gmail.com>2021-04-02 23:18:25 +0200
committertgingold <tgingold@users.noreply.github.com>2021-04-03 15:54:39 +0200
commita94f02122cf1e3b820dc929d0eb91e48af8c5fab (patch)
tree66d0ec66b82a8fdfee66122a92ccddd2325d52e7
parent800656a30c2385b591766281cbc35de1582ce8f5 (diff)
downloadghdl-a94f02122cf1e3b820dc929d0eb91e48af8c5fab.tar.gz
ghdl-a94f02122cf1e3b820dc929d0eb91e48af8c5fab.tar.bz2
ghdl-a94f02122cf1e3b820dc929d0eb91e48af8c5fab.zip
src: Provide nicer message if Tok_Is is swapped with Tok_Assign for alias.
-rw-r--r--src/vhdl/vhdl-parse.adb8
1 files 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