mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 06:50:30 +00:00
vbscript: Short if statement may have optional 'end if'.
This commit is contained in:
parent
fdf2e15b80
commit
cb1a8a3c58
|
@ -221,9 +221,13 @@ IfStatement
|
|||
: tIF Expression tTHEN tNL StatementsNl ElseIfs_opt Else_opt tEND tIF
|
||||
{ $$ = new_if_statement(ctx, $2, $5, $6, $7); CHECK_ERROR; }
|
||||
| tIF Expression tTHEN Statement { $$ = new_if_statement(ctx, $2, $4, NULL, NULL); CHECK_ERROR; }
|
||||
| tIF Expression tTHEN Statement tELSE Statement
|
||||
| tIF Expression tTHEN Statement tELSE Statement EndIf_opt
|
||||
{ $$ = new_if_statement(ctx, $2, $4, NULL, $6); CHECK_ERROR; }
|
||||
|
||||
EndIf_opt
|
||||
: /* empty */
|
||||
| tEND tIF
|
||||
|
||||
ElseIfs_opt
|
||||
: /* empty */ { $$ = NULL; }
|
||||
| ElseIfs { $$ = $1; }
|
||||
|
|
|
@ -209,6 +209,8 @@ if false then :
|
|||
|
||||
if false then x = y : if true then call ok(false, "embedded if called")
|
||||
|
||||
if false then x=1 else x=2 end if
|
||||
|
||||
if false then
|
||||
ok false, "if false called"
|
||||
end if
|
||||
|
|
Loading…
Reference in a new issue