From: Jason Millard jsm174@gmail.com
--- dlls/vbscript/parser.y | 2 +- dlls/vbscript/tests/lang.vbs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 382504a3d5a..78509ca9707 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -319,7 +319,7 @@ ElseIf
Else_opt : /* empty */ { $$ = NULL; } - | tELSE tNL StatementsNl_opt { $$ = $3; } + | tELSE StSep_opt StatementsNl_opt { $$ = $3; } | tELSE StatementsNl_opt { $$ = $2; }
CaseClausules diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 3a67cd09dff..1707cc9a92b 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -298,6 +298,15 @@ Else x = true End If Call ok(x, "else not called?")
+' Else with colon before statement following newline +x = false +If false Then + Call ok(false, "inside if false") +Else +: x = true +End If +Call ok(x, "else not called?") + x = false If false Then Call ok(false, "inside if false")