Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
20b2d057
Commit
20b2d057
authored
Sep 18, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Fixed parsing if statements with empty body.
parent
3b9a13e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
parser.y
dlls/vbscript/parser.y
+3
-3
lang.vbs
dlls/vbscript/tests/lang.vbs
+16
-0
No files found.
dlls/vbscript/parser.y
View file @
20b2d057
...
...
@@ -228,7 +228,7 @@ Step_opt
| tSTEP Expression { $$ = $2; }
IfStatement
: tIF Expression tTHEN tNL StatementsNl ElseIfs_opt Else_opt tEND tIF
: tIF Expression tTHEN tNL StatementsNl
_opt
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 EndIf_opt
...
...
@@ -247,12 +247,12 @@ ElseIfs
| ElseIf ElseIfs { $1->next = $2; $$ = $1; }
ElseIf
: tELSEIF Expression tTHEN tNL StatementsNl
: tELSEIF Expression tTHEN tNL StatementsNl
_opt
{ $$ = new_elseif_decl(ctx, $2, $5); }
Else_opt
: /* empty */ { $$ = NULL; }
| tELSE tNL StatementsNl
{ $$ = $3; }
| tELSE tNL StatementsNl
_opt
{ $$ = $3; }
CaseClausules
: /* empty */ { $$ = NULL; }
...
...
dlls/vbscript/tests/lang.vbs
View file @
20b2d057
...
...
@@ -290,6 +290,22 @@ while not (x and y)
wend
call
ok
((
x
and
y
),
"x or y is false after while"
)
if
false
then
' empty body
end
if
if
false
then
x
=
false
elseif
true
then
' empty body
end
if
if
false
then
x
=
false
else
' empty body
end
if
while
false
wend
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment