vbscript: Fix compile when colon follows Else on new line.

This commit is contained in:
Jason Millard 2023-02-09 12:14:37 -05:00 committed by Alexandre Julliard
parent c5957eb937
commit afb2125cdf
2 changed files with 10 additions and 2 deletions

View file

@ -319,8 +319,7 @@ ElseIf
Else_opt
: /* empty */ { $$ = NULL; }
| tELSE tNL StatementsNl_opt { $$ = $3; }
| tELSE StatementsNl_opt { $$ = $2; }
| tELSE StSep_opt StatementsNl_opt { $$ = $3; }
CaseClausules
: /* empty */ { $$ = NULL; }

View file

@ -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")