Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5a2b3e0d
Commit
5a2b3e0d
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: Added support for do..loop statement without an expression.
parent
3fa78601
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
compile.c
dlls/vbscript/compile.c
+11
-4
parser.y
dlls/vbscript/parser.y
+1
-0
lang.vbs
dlls/vbscript/tests/lang.vbs
+7
-0
No files found.
dlls/vbscript/compile.c
View file @
5a2b3e0d
...
...
@@ -625,6 +625,7 @@ static HRESULT compile_dowhile_statement(compile_ctx_t *ctx, while_statement_t *
{
statement_ctx_t
loop_ctx
=
{
0
};
unsigned
start_addr
;
vbsop_t
jmp_op
;
HRESULT
hres
;
start_addr
=
ctx
->
instr_cnt
;
...
...
@@ -636,11 +637,17 @@ static HRESULT compile_dowhile_statement(compile_ctx_t *ctx, while_statement_t *
if
(
FAILED
(
hres
))
return
hres
;
hres
=
compile_expression
(
ctx
,
stat
->
expr
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
stat
->
expr
)
{
hres
=
compile_expression
(
ctx
,
stat
->
expr
);
if
(
FAILED
(
hres
))
return
hres
;
jmp_op
=
stat
->
stat
.
type
==
STAT_DOUNTIL
?
OP_jmp_false
:
OP_jmp_true
;
}
else
{
jmp_op
=
OP_jmp
;
}
hres
=
push_instr_addr
(
ctx
,
stat
->
stat
.
type
==
STAT_DOUNTIL
?
OP_jmp_false
:
OP_jmp_true
,
start_addr
);
hres
=
push_instr_addr
(
ctx
,
jmp_op
,
start_addr
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/vbscript/parser.y
View file @
5a2b3e0d
...
...
@@ -185,6 +185,7 @@ SimpleStatement
| tDO tNL StatementsNl_opt tLOOP DoType Expression
{ $$ = new_while_statement(ctx, $5 ? STAT_DOWHILE : STAT_DOUNTIL, $6, $3);
CHECK_ERROR; }
| tDO tNL StatementsNl_opt tLOOP { $$ = new_while_statement(ctx, STAT_DOWHILE, NULL, $3); CHECK_ERROR; }
| FunctionDecl { $$ = new_function_statement(ctx, $1); CHECK_ERROR; }
| tEXIT tDO { $$ = new_statement(ctx, STAT_EXITDO, 0); CHECK_ERROR; }
| tEXIT tFOR { $$ = new_statement(ctx, STAT_EXITFOR, 0); CHECK_ERROR; }
...
...
dlls/vbscript/tests/lang.vbs
View file @
5a2b3e0d
...
...
@@ -346,6 +346,13 @@ do until false
loop
x
=
false
do
if
x
then
exit
do
x
=
true
loop
call
ok
(
x
,
"x is false after do..loop?"
)
x
=
false
y
=
false
do
if
x
then
...
...
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