Commit 18e7e07a authored by Dmitry Kislyuk's avatar Dmitry Kislyuk Committed by Alexandre Julliard

vbscript: Parse empty CASE ELSE clause.

parent b8dc6b24
...@@ -301,7 +301,7 @@ Else_opt ...@@ -301,7 +301,7 @@ Else_opt
CaseClausules CaseClausules
: /* empty */ { $$ = NULL; } : /* 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 | tCASE ExpressionList StSep StatementsNl_opt CaseClausules
{ $$ = new_case_clausule(ctx, $2, $4, $5); } { $$ = new_case_clausule(ctx, $2, $4, $5); }
......
...@@ -681,6 +681,14 @@ select case 1 : ...@@ -681,6 +681,14 @@ select case 1 :
end select end select
Call ok(x, "wrong case") 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 if false then
Sub testsub Sub testsub
x = true x = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment