vbscript: Parse empty CASE ELSE clause.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49439
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Kislyuk 2020-06-25 00:50:46 -05:00 committed by Alexandre Julliard
parent b8dc6b2412
commit 18e7e07a77
2 changed files with 9 additions and 1 deletions

View File

@ -301,7 +301,7 @@ Else_opt
CaseClausules
: /* empty */ { $$ = NULL; }
| tCASE tELSE StSep StatementsNl { $$ = new_case_clausule(ctx, NULL, $4, NULL); }
| tCASE tELSE StSep StatementsNl_opt { $$ = new_case_clausule(ctx, NULL, $4, NULL); }
| tCASE ExpressionList StSep StatementsNl_opt CaseClausules
{ $$ = new_case_clausule(ctx, $2, $4, $5); }

View File

@ -681,6 +681,14 @@ select case 1 :
end select
Call ok(x, "wrong case")
select case 0
case 1
case else
'empty else with comment test
end select
select case 0 : case 1 : case else : end select
if false then
Sub testsub
x = true