diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-11-30 20:53:06 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-11-30 20:53:06 +0100 |
commit | 60618f57908ba6489c3e3945bd0f9323c5a5ac1c (patch) | |
tree | be3fc66fce5e176ea2ad8d298ec043212eb21cca | |
parent | edc1bf4390318835c8f945c13e277c771dcda967 (diff) | |
download | ghdl-60618f57908ba6489c3e3945bd0f9323c5a5ac1c.tar.gz ghdl-60618f57908ba6489c3e3945bd0f9323c5a5ac1c.tar.bz2 ghdl-60618f57908ba6489c3e3945bd0f9323c5a5ac1c.zip |
parse: do not eat unused token in alias.
-rw-r--r-- | src/vhdl/parse.adb | 15 |
1 files 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 ':'. |