From 60618f57908ba6489c3e3945bd0f9323c5a5ac1c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 30 Nov 2018 20:53:06 +0100 Subject: parse: do not eat unused token in alias. --- src/vhdl/parse.adb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 13c9d1f29..492fd0395 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -3634,21 +3634,24 @@ package body Parse is Set_Location (Res); case Current_Token is - when Tok_Identifier => - Ident := Current_Identifier; - when Tok_Character => + when Tok_Identifier + | Tok_Character => Ident := Current_Identifier; + + -- Skip identifier/character. + Scan; when Tok_String => Ident := Scan_To_Operator_Name (Get_Token_Location); + + -- Skip operator. + Scan; -- FIXME: vhdl87 -- FIXME: operator symbol. when others => Error_Msg_Parse ("alias designator expected"); + Ident := Null_Identifier; end case; - - -- Skip identifier. Set_Identifier (Res, Ident); - Scan; if Current_Token = Tok_Colon then -- Skip ':'. -- cgit v1.2.3