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
aa045d51
Commit
aa045d51
authored
Mar 08, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscipt: Allow ':' to be a separator in select case statement.
parent
6f459022
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
parser.y
dlls/vbscript/parser.y
+9
-3
lang.vbs
dlls/vbscript/tests/lang.vbs
+20
-0
No files found.
dlls/vbscript/parser.y
View file @
aa045d51
...
...
@@ -205,7 +205,7 @@ SimpleStatement
{ $$ = new_forto_statement(ctx, $2, $4, $6, $7, $9); CHECK_ERROR; }
| tFOR tEACH Identifier tIN Expression tNL StatementsNl_opt tNEXT
{ $$ = new_foreach_statement(ctx, $3, $5, $7); }
| tSELECT tCASE Expression
tNL
CaseClausules tEND tSELECT
| tSELECT tCASE Expression
StSep
CaseClausules tEND tSELECT
{ $$ = new_select_statement(ctx, $3, $5); }
MemberExpression
...
...
@@ -273,8 +273,8 @@ Else_opt
CaseClausules
: /* empty */ { $$ = NULL; }
| tCASE tELSE
tNL StatementsNl
{ $$ = new_case_clausule(ctx, NULL, $4, NULL); }
| tCASE ExpressionList
tNL
StatementsNl_opt CaseClausules
| tCASE tELSE
StSep StatementsNl
{ $$ = new_case_clausule(ctx, NULL, $4, NULL); }
| tCASE ExpressionList
StSep
StatementsNl_opt CaseClausules
{ $$ = new_case_clausule(ctx, $2, $4, $5); }
Arguments_opt
...
...
@@ -442,6 +442,12 @@ ArgumentDecl
Identifier
: tIdentifier { $$ = $1; }
| tPROPERTY { $$ = propertyW; }
/* Some statements accept both new line and ':' as a separator */
StSep
: tNL
| ':'
%%
static int parser_error(parser_ctx_t *ctx, const char *str)
...
...
dlls/vbscript/tests/lang.vbs
View file @
aa045d51
...
...
@@ -224,6 +224,10 @@ if false then x = y : if true then call ok(false, "embedded if called")
if
false
then
x
=
1
else
x
=
2
end
if
x
=
false
if
false
then
x
=
true
:
x
=
true
Call
ok
(
x
=
false
,
"x <> false"
)
if
false
then
ok
false
,
"if false called"
end
if
...
...
@@ -538,6 +542,22 @@ end select
select
case
0
end
select
x
=
false
select
case
2
case
3
,
1
,
2
,
4
:
x
=
true
case
5
,
6
,
7
Call
ok
(
false
,
"unexpected case"
)
end
select
Call
ok
(
x
,
"wrong case"
)
x
=
false
select
case
2
:
case
5
,
6
,
7
:
Call
ok
(
false
,
"unexpected case"
)
case
2
,
1
,
2
,
4
x
=
true
case
else
:
Call
ok
(
false
,
"unexpected case else"
)
end
select
Call
ok
(
x
,
"wrong case"
)
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