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
1f5c56d1
Commit
1f5c56d1
authored
Sep 16, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added do while..loop statement implementation.
parent
3d349258
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
compile.c
dlls/vbscript/compile.c
+1
-0
parse.h
dlls/vbscript/parse.h
+2
-1
parser.y
dlls/vbscript/parser.y
+2
-0
lang.vbs
dlls/vbscript/tests/lang.vbs
+13
-0
No files found.
dlls/vbscript/compile.c
View file @
1f5c56d1
...
...
@@ -661,6 +661,7 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat)
hres
=
push_instr
(
ctx
,
OP_stop
)
==
-
1
?
E_OUTOFMEMORY
:
S_OK
;
break
;
case
STAT_WHILE
:
case
STAT_WHILELOOP
:
hres
=
compile_while_statement
(
ctx
,
(
while_statement_t
*
)
stat
);
break
;
default:
...
...
dlls/vbscript/parse.h
View file @
1f5c56d1
...
...
@@ -100,7 +100,8 @@ typedef enum {
STAT_IF
,
STAT_SET
,
STAT_STOP
,
STAT_WHILE
STAT_WHILE
,
STAT_WHILELOOP
}
statement_type_t
;
typedef
struct
_statement_t
{
...
...
dlls/vbscript/parser.y
View file @
1f5c56d1
...
...
@@ -156,6 +156,8 @@ Statement
| IfStatement { $$ = $1; }
| tWHILE Expression tNL StatementsNl_opt tWEND
{ $$ = new_while_statement(ctx, STAT_WHILE, $2, $4); CHECK_ERROR; }
| tDO tWHILE Expression tNL StatementsNl_opt tLOOP
{ $$ = new_while_statement(ctx, STAT_WHILELOOP, $3, $5); CHECK_ERROR; }
| FunctionDecl { $$ = new_function_statement(ctx, $1); CHECK_ERROR; }
| tEXIT tFUNCTION { $$ = new_statement(ctx, STAT_EXITFUNC, 0); CHECK_ERROR; }
| tEXIT tPROPERTY { $$ = new_statement(ctx, STAT_EXITPROP, 0); CHECK_ERROR; }
...
...
dlls/vbscript/tests/lang.vbs
View file @
1f5c56d1
...
...
@@ -212,6 +212,19 @@ call ok((x and y), "x or y is false after while")
while
false
wend
x
=
false
y
=
false
do
while
not
(
x
and
y
)
if
x
then
y
=
true
end
if
x
=
true
loop
call
ok
((
x
and
y
),
"x or y is false after while"
)
do
while
false
loop
if
false
then
Sub
testsub
x
=
true
...
...
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