diff options
| author | Tristan Gingold <tgingold@free.fr> | 2019-06-13 18:17:57 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2019-06-13 18:17:57 +0200 | 
| commit | a868ef001e20329f0ffe6bf6557f2d7381f96bfe (patch) | |
| tree | 659ae298f4888a822d2bb61996446796f9d8e470 /src | |
| parent | 66bc221d126f273f8677fb1f61484b7c825a07f5 (diff) | |
| download | ghdl-a868ef001e20329f0ffe6bf6557f2d7381f96bfe.tar.gz ghdl-a868ef001e20329f0ffe6bf6557f2d7381f96bfe.tar.bz2 ghdl-a868ef001e20329f0ffe6bf6557f2d7381f96bfe.zip  | |
vhdl-parse: improve error message in case of unexpected
Diffstat (limited to 'src')
| -rw-r--r-- | src/vhdl/vhdl-parse.adb | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index d227d9b9f..36750870f 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -3711,6 +3711,18 @@ package body Vhdl.Parse is        --  Skip ':'.        Expect_Scan (Tok_Colon); +      --  Skip unexpected mode, this could happen when the interface is +      --  copied. +      case Current_Token is +         when Tok_In | Tok_Out | Tok_Inout | Tok_Buffer | Tok_Linkage => +            Error_Msg_Parse ("mode not allowed in object declaration"); + +            --  Skip mode. +            Scan; +         when others => +            null; +      end case; +        Object_Type := Parse_Subtype_Indication;        if Kind = Iir_Kind_Signal_Declaration then  | 
