summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Gingold2015-01-15 06:53:00 +0100
committerTristan Gingold2015-01-15 06:53:00 +0100
commit1171507e898db362faa6299bdc845073cd3beeae (patch)
tree51029461c667ff155ee08957528f474b8c8b051c
parentb2581a045d696a43bef147cd782721182db14f2f (diff)
downloadghdl-1171507e898db362faa6299bdc845073cd3beeae.tar.gz
ghdl-1171507e898db362faa6299bdc845073cd3beeae.tar.bz2
ghdl-1171507e898db362faa6299bdc845073cd3beeae.zip
parser: improve error message and recovery on = for default expression.
-rw-r--r--src/vhdl/parse.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index fef7347..1eb513f 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -2951,6 +2951,13 @@ package body Parse is
Scan;
Default_Value := Parse_Expression;
+ elsif Current_Token = Tok_Equal then
+ Error_Msg_Parse ("= should be := for initial value");
+
+ -- Skip '='
+ Scan;
+
+ Default_Value := Parse_Expression;
else
Default_Value := Null_Iir;
end if;