aboutsummaryrefslogtreecommitdiffstats
path: root/parse.adb
diff options
context:
space:
mode:
Diffstat (limited to 'parse.adb')
-rw-r--r--parse.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse.adb b/parse.adb
index a0e388e1c..2b66289e3 100644
--- a/parse.adb
+++ b/parse.adb
@@ -2782,6 +2782,14 @@ package body Parse is
return A_Choice;
else
Expr1 := Parse_Expression;
+
+ if Expr1 = Null_Iir then
+ -- Handle parse error now.
+ -- FIXME: skip until '=>'.
+ A_Choice := Create_Iir (Iir_Kind_Choice_By_Expression);
+ Set_Location (A_Choice);
+ return A_Choice;
+ end if;
end if;
else
Expr1 := Expr;