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
d26998d6
Commit
d26998d6
authored
Jan 30, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Allow any call expression to be used in set statement.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c9941184
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
parser.y
dlls/vbscript/parser.y
+5
-12
lang.vbs
dlls/vbscript/tests/lang.vbs
+4
-0
No files found.
dlls/vbscript/parser.y
View file @
d26998d6
...
...
@@ -48,7 +48,7 @@ static call_expression_t *make_call_expression(parser_ctx_t*,expression_t*,expre
static void *new_statement(parser_ctx_t*,statement_type_t,size_t,unsigned);
static statement_t *new_call_statement(parser_ctx_t*,unsigned,BOOL,expression_t*);
static statement_t *new_assign_statement(parser_ctx_t*,unsigned,expression_t*,expression_t*);
static statement_t *new_set_statement(parser_ctx_t*,unsigned,
member_expression_t*,
expression_t*,expression_t*);
static statement_t *new_set_statement(parser_ctx_t*,unsigned,expression_t*,expression_t*);
static statement_t *new_dim_statement(parser_ctx_t*,unsigned,dim_decl_t*);
static statement_t *new_redim_statement(parser_ctx_t*,unsigned,const WCHAR*,BOOL,expression_t*);
static statement_t *new_while_statement(parser_ctx_t*,unsigned,statement_type_t,expression_t*,statement_t*);
...
...
@@ -136,7 +136,7 @@ static statement_t *link_statements(statement_t*,statement_t*);
%type <expression> NotExpression UnaryExpression AndExpression OrExpression XorExpression EqvExpression SignExpression
%type <expression> ConstExpression NumericLiteralExpression
%type <member> MemberExpression
%type <expression> Arguments Argument
s_opt Argument
List ArgumentList_opt Step_opt ExpressionList
%type <expression> Arguments ArgumentList ArgumentList_opt Step_opt ExpressionList
%type <boolean> DoType Preserve_opt
%type <arg_decl> ArgumentsDecl_opt ArgumentDeclList ArgumentDecl
%type <func_decl> FunctionDecl PropertyDecl
...
...
@@ -216,8 +216,7 @@ SimpleStatement
| tEXIT tFUNCTION { $$ = new_statement(ctx, STAT_EXITFUNC, 0, @$); CHECK_ERROR; }
| tEXIT tPROPERTY { $$ = new_statement(ctx, STAT_EXITPROP, 0, @$); CHECK_ERROR; }
| tEXIT tSUB { $$ = new_statement(ctx, STAT_EXITSUB, 0, @$); CHECK_ERROR; }
| tSET MemberExpression Arguments_opt '=' Expression
{ $$ = new_set_statement(ctx, @$, $2, $3, $5); CHECK_ERROR; }
| tSET CallExpression '=' Expression { $$ = new_set_statement(ctx, @$, $2, $4); CHECK_ERROR; }
| tSTOP { $$ = new_statement(ctx, STAT_STOP, 0, @$); CHECK_ERROR; }
| tON tERROR tRESUME tNEXT { $$ = new_onerror_statement(ctx, @$, TRUE); CHECK_ERROR; }
| tON tERROR tGOTO '0' { $$ = new_onerror_statement(ctx, @$, FALSE); CHECK_ERROR; }
...
...
@@ -310,10 +309,6 @@ Arguments
: tEMPTYBRACKETS { $$ = NULL; }
| '(' ArgumentList ')' { $$ = $2; }
Arguments_opt
: /* empty */ { $$ = NULL; }
| Arguments { $$ = $1; }
ArgumentList_opt
: /* empty */ { $$ = NULL; }
| ArgumentList { $$ = $1; }
...
...
@@ -769,7 +764,7 @@ static statement_t *new_assign_statement(parser_ctx_t *ctx, unsigned loc, expres
return &stat->stat;
}
static statement_t *new_set_statement(parser_ctx_t *ctx, unsigned loc,
member_expression_t *left, expression_t *arguments
, expression_t *right)
static statement_t *new_set_statement(parser_ctx_t *ctx, unsigned loc,
expression_t *left
, expression_t *right)
{
assign_statement_t *stat;
...
...
@@ -777,10 +772,8 @@ static statement_t *new_set_statement(parser_ctx_t *ctx, unsigned loc, member_ex
if(!stat)
return NULL;
stat->left_expr = left;
stat->value_expr = right;
stat->left_expr = (expression_t*)new_call_expression(ctx, &left->expr, arguments);
if(!stat->left_expr)
return NULL;
return &stat->stat;
}
...
...
dlls/vbscript/tests/lang.vbs
View file @
d26998d6
...
...
@@ -1630,6 +1630,10 @@ x.prop.prop.prop = 2
call
ok
(
x
.
getProp
().
getProp
.
prop
=
2
,
"x.getProp().getProp.prop = "
&
x
.
getProp
().
getProp
.
prop
)
x
.
getprop
.
getprop
().
prop
=
3
call
ok
(
x
.
getProp
.
prop
.
prop
=
3
,
"x.getProp.prop.prop = "
&
x
.
getProp
.
prop
.
prop
)
set
x
.
getprop
.
getprop
().
prop
=
new
emptyclass
set
obj
=
new
emptyclass
set
x
.
getprop
.
getprop
().
prop
=
obj
call
ok
(
x
.
getprop
.
getprop
().
prop
is
obj
,
"x.getprop.getprop().prop is not obj (emptyclass)"
)
ok
getVT
(
x
)
=
"VT_DISPATCH*"
,
"getVT(x) = "
&
getVT
(
x
)
todo_wine_ok
getVT
(
x
())
=
"VT_BSTR"
,
"getVT(x()) = "
&
getVT
(
x
())
...
...
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