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
c9941184
Commit
c9941184
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 assignment left expression to be member expression.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c74770c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
17 deletions
+24
-17
compile.c
dlls/vbscript/compile.c
+21
-7
parse.h
dlls/vbscript/parse.h
+1
-1
parser.y
dlls/vbscript/parser.y
+2
-9
No files found.
dlls/vbscript/compile.c
View file @
c9941184
...
...
@@ -993,15 +993,27 @@ static HRESULT compile_select_statement(compile_ctx_t *ctx, select_statement_t *
return
S_OK
;
}
static
HRESULT
compile_assignment
(
compile_ctx_t
*
ctx
,
call_
expression_t
*
left
,
expression_t
*
value_expr
,
BOOL
is_set
)
static
HRESULT
compile_assignment
(
compile_ctx_t
*
ctx
,
expression_t
*
left
,
expression_t
*
value_expr
,
BOOL
is_set
)
{
call_expression_t
*
call_expr
=
NULL
;
member_expression_t
*
member_expr
;
unsigned
args_cnt
;
unsigned
args_cnt
=
0
;
vbsop_t
op
;
HRESULT
hres
;
assert
(
left
->
call_expr
->
type
==
EXPR_MEMBER
);
member_expr
=
(
member_expression_t
*
)
left
->
call_expr
;
switch
(
left
->
type
)
{
case
EXPR_MEMBER
:
member_expr
=
(
member_expression_t
*
)
left
;
break
;
case
EXPR_CALL
:
call_expr
=
(
call_expression_t
*
)
left
;
assert
(
call_expr
->
call_expr
->
type
==
EXPR_MEMBER
);
member_expr
=
(
member_expression_t
*
)
call_expr
->
call_expr
;
break
;
default:
assert
(
0
);
return
E_FAIL
;
}
if
(
member_expr
->
obj_expr
)
{
hres
=
compile_expression
(
ctx
,
member_expr
->
obj_expr
);
...
...
@@ -1017,9 +1029,11 @@ static HRESULT compile_assignment(compile_ctx_t *ctx, call_expression_t *left, e
if
(
FAILED
(
hres
))
return
hres
;
hres
=
compile_args
(
ctx
,
left
->
args
,
&
args_cnt
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
call_expr
)
{
hres
=
compile_args
(
ctx
,
call_expr
->
args
,
&
args_cnt
);
if
(
FAILED
(
hres
))
return
hres
;
}
hres
=
push_instr_bstr_uint
(
ctx
,
op
,
member_expr
->
identifier
,
args_cnt
);
if
(
FAILED
(
hres
))
...
...
dlls/vbscript/parse.h
View file @
c9941184
...
...
@@ -145,7 +145,7 @@ typedef struct {
typedef
struct
{
statement_t
stat
;
call_
expression_t
*
left_expr
;
expression_t
*
left_expr
;
expression_t
*
value_expr
;
}
assign_statement_t
;
...
...
dlls/vbscript/parser.y
View file @
c9941184
...
...
@@ -763,16 +763,9 @@ static statement_t *new_assign_statement(parser_ctx_t *ctx, unsigned loc, expres
if(!stat)
return NULL;
stat->left_expr = left;
stat->value_expr = right;
if(left->type == EXPR_CALL) {
stat->left_expr = (call_expression_t*)left;
}else {
stat->left_expr = new_call_expression(ctx, left, NULL);
if(!stat->left_expr)
return NULL;
}
return &stat->stat;
}
...
...
@@ -785,7 +778,7 @@ static statement_t *new_set_statement(parser_ctx_t *ctx, unsigned loc, member_ex
return NULL;
stat->value_expr = right;
stat->left_expr = new_call_expression(ctx, &left->expr, arguments);
stat->left_expr =
(expression_t*)
new_call_expression(ctx, &left->expr, arguments);
if(!stat->left_expr)
return NULL;
...
...
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