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
114ffc87
Commit
114ffc87
authored
Sep 09, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added compiler/parser support for call expressions.
parent
6d7ec9cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
compile.c
dlls/vbscript/compile.c
+5
-3
interp.c
dlls/vbscript/interp.c
+6
-0
parser.y
dlls/vbscript/parser.y
+6
-2
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/compile.c
View file @
114ffc87
...
...
@@ -146,7 +146,7 @@ static HRESULT compile_args(compile_ctx_t *ctx, expression_t *args, unsigned *re
return
S_OK
;
}
static
HRESULT
compile_member_expression
(
compile_ctx_t
*
ctx
,
member_expression_t
*
expr
)
static
HRESULT
compile_member_expression
(
compile_ctx_t
*
ctx
,
member_expression_t
*
expr
,
BOOL
ret_val
)
{
unsigned
arg_cnt
=
0
;
HRESULT
hres
;
...
...
@@ -159,7 +159,7 @@ static HRESULT compile_member_expression(compile_ctx_t *ctx, member_expression_t
FIXME
(
"obj_expr not implemented
\n
"
);
hres
=
E_NOTIMPL
;
}
else
{
hres
=
push_instr_bstr_uint
(
ctx
,
OP_icallv
,
expr
->
identifier
,
arg_cnt
);
hres
=
push_instr_bstr_uint
(
ctx
,
ret_val
?
OP_icall
:
OP_icallv
,
expr
->
identifier
,
arg_cnt
);
}
return
hres
;
...
...
@@ -198,6 +198,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return
push_instr_int
(
ctx
,
OP_bool
,
((
bool_expression_t
*
)
expr
)
->
value
);
case
EXPR_EQUAL
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_equal
);
case
EXPR_MEMBER
:
return
compile_member_expression
(
ctx
,
(
member_expression_t
*
)
expr
,
TRUE
);
case
EXPR_NOT
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_not
);
case
EXPR_STRING
:
...
...
@@ -217,7 +219,7 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat)
while
(
stat
)
{
switch
(
stat
->
type
)
{
case
STAT_CALL
:
hres
=
compile_member_expression
(
ctx
,
((
call_statement_t
*
)
stat
)
->
expr
);
hres
=
compile_member_expression
(
ctx
,
((
call_statement_t
*
)
stat
)
->
expr
,
FALSE
);
break
;
default:
FIXME
(
"Unimplemented statement type %d
\n
"
,
stat
->
type
);
...
...
dlls/vbscript/interp.c
View file @
114ffc87
...
...
@@ -168,6 +168,12 @@ static void vbstack_to_dp(exec_ctx_t *ctx, unsigned arg_cnt, DISPPARAMS *dp)
}
}
static
HRESULT
interp_icall
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
interp_icallv
(
exec_ctx_t
*
ctx
)
{
BSTR
identifier
=
ctx
->
instr
->
arg1
.
bstr
;
...
...
dlls/vbscript/parser.y
View file @
114ffc87
...
...
@@ -75,7 +75,7 @@ static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*);
%token <string> tIdentifier tString
%type <statement> Statement StatementNl
%type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression
%type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression
CallExpression
%type <expression> ConcatExpression
%type <expression> NotExpression
%type <member> MemberExpression
...
...
@@ -135,7 +135,11 @@ EqualityExpression
ConcatExpression
: LiteralExpression /* FIXME */ { $$ = $1; }
| PrimaryExpression /* FIXME */ { $$ = $1; }
| CallExpression /* FIXME */ { $$ = $1; }
CallExpression
: PrimaryExpression { $$ = $1; }
| MemberExpression Arguments_opt { $1->args = $2; $$ = &$1->expr; }
LiteralExpression
: tTRUE { $$ = new_bool_expression(ctx, VARIANT_TRUE); CHECK_ERROR; }
...
...
dlls/vbscript/vbscript.h
View file @
114ffc87
...
...
@@ -77,6 +77,7 @@ typedef enum {
#define OP_LIST \
X(bool, 1, ARG_INT, 0) \
X(equal, 1, 0, 0) \
X(icall, 1, ARG_BSTR, ARG_UINT) \
X(icallv, 1, ARG_BSTR, ARG_UINT) \
X(not, 1, 0, 0) \
X(ret, 0, 0, 0) \
...
...
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