Commit 270c09ee authored by Jason Millard's avatar Jason Millard Committed by Alexandre Julliard

vbscript: Fix compile when statement after ElseIf or after separator.

(cherry picked from commit 887e72b2)
parent 5dec0c13
......@@ -314,7 +314,7 @@ ElseIfs
| ElseIf ElseIfs { $1->next = $2; $$ = $1; }
ElseIf
: tELSEIF Expression tTHEN tNL StatementsNl_opt
: tELSEIF Expression tTHEN StSep_opt StatementsNl_opt
{ $$ = new_elseif_decl(ctx, @$, $2, $5); }
Else_opt
......
......@@ -337,6 +337,23 @@ ElseIf not False Then
End If
Call ok(x, "elseif not called?")
' ElseIf with statement on same line
x = false
If false Then
Call ok(false, "inside if false")
ElseIf not False Then x = true
End If
Call ok(x, "elseif not called?")
' ElseIf with statement following statement separator
x = false
If false Then
Call ok(false, "inside if false")
ElseIf not False Then
: x = true
End If
Call ok(x, "elseif not called?")
x = false
if 1 then x = true
Call ok(x, "if 1 not run?")
......
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