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
7146387d
Commit
7146387d
authored
Sep 20, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added support for short if statements.
parent
645d4596
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
parser.y
dlls/vbscript/parser.y
+3
-1
lang.vbs
dlls/vbscript/tests/lang.vbs
+23
-0
No files found.
dlls/vbscript/parser.y
View file @
7146387d
...
...
@@ -198,7 +198,9 @@ DoType
IfStatement
: tIF Expression tTHEN tNL StatementsNl ElseIfs_opt Else_opt tEND tIF
{ $$ = new_if_statement(ctx, $2, $5, $6, $7); CHECK_ERROR; }
/* FIXME: short if statement */
| tIF Expression tTHEN Statement { $$ = new_if_statement(ctx, $2, $4, NULL, NULL); CHECK_ERROR; }
| tIF Expression tTHEN Statement tELSE Statement
{ $$ = new_if_statement(ctx, $2, $4, NULL, $6); CHECK_ERROR; }
ElseIfs_opt
: /* empty */ { $$ = NULL; }
...
...
dlls/vbscript/tests/lang.vbs
View file @
7146387d
...
...
@@ -164,6 +164,29 @@ Call ok(2^3^2 = 64, "2^3^2 = " & (2^3^2))
Call
ok
(
-
3
^
2
=
9
,
"-3^2 = "
&
(
-
3
^
2
))
Call
ok
(
2
*
3
^
2
=
18
,
"2*3^2 = "
&
(
2
*
3
^
2
))
if
true
then
y
=
true
:
x
=
y
ok
x
,
"x is false"
x
=
true
:
if
false
then
x
=
false
ok
x
,
"x is false, if false called?"
if
not
false
then
x
=
true
ok
x
,
"x is false, if not false not called?"
if
not
false
then
x
=
"test"
:
x
=
true
ok
x
,
"x is false, if not false not called?"
if
false
then
x
=
y
:
call
ok
(
false
,
"if false .. : called"
)
if
false
then
x
=
y
:
call
ok
(
false
,
"if false .. : called"
)
else
x
=
"else"
Call
ok
(
x
=
"else"
,
"else not called?"
)
if
true
then
x
=
y
else
y
=
x
:
Call
ok
(
false
,
"in else?"
)
if
false
then
:
if
false
then
x
=
y
:
if
true
then
call
ok
(
false
,
"embedded if called"
)
if
false
then
ok
false
,
"if false called"
end
if
...
...
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