diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-08-27 13:59:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-08-27 13:59:15 +0200 |
commit | 1ced6e9ee20a12bd4ef75fe869279dfcf260d6de (patch) | |
tree | 3664b2eb51402ee64a61252528b3b6ea78f8cf1c | |
parent | a743916046a3e8ed32cd467aa82efe64cd9a445c (diff) | |
download | ghdl-1ced6e9ee20a12bd4ef75fe869279dfcf260d6de.tar.gz ghdl-1ced6e9ee20a12bd4ef75fe869279dfcf260d6de.tar.bz2 ghdl-1ced6e9ee20a12bd4ef75fe869279dfcf260d6de.zip |
vhdl-parse: support for-generate in vunits. Fix #1850
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 01c8df6ca..6a6f67024 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -5457,7 +5457,8 @@ package body Vhdl.Parse is | Iir_Kind_Package_Body | Iir_Kind_Protected_Type_Body | Iir_Kind_Protected_Type_Declaration - | Iir_Kind_Simultaneous_Procedural_Statement => + | Iir_Kind_Simultaneous_Procedural_Statement + | Iir_Kind_Vunit_Declaration => Error_Msg_Parse ("configuration specification not allowed here"); when Iir_Kind_Architecture_Body @@ -11301,7 +11302,6 @@ package body Vhdl.Parse is | Tok_Impure | Tok_Procedure | Tok_Alias - | Tok_For | Tok_Attribute | Tok_Disconnect | Tok_Use @@ -11318,6 +11318,14 @@ package body Vhdl.Parse is Vhdl.Scanner.Flag_Psl := False; Item := Parse_Declaration (Res, Res); + when Tok_For => + Vhdl.Scanner.Flag_Psl := False; + if Label = Null_Identifier then + Item := Parse_Declaration (Res, Res); + else + Item := Parse_Concurrent_Statement (Res, Label); + end if; + when Tok_End | Tok_Eof | Tok_Right_Curly => |