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
69de0798
Commit
69de0798
authored
Sep 14, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added 'and' expression parser/compiler implementation.
parent
f9edb683
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
2 deletions
+16
-2
compile.c
dlls/vbscript/compile.c
+2
-0
interp.c
dlls/vbscript/interp.c
+6
-0
parse.h
dlls/vbscript/parse.h
+1
-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 @
69de0798
...
@@ -356,6 +356,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
...
@@ -356,6 +356,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
switch
(
expr
->
type
)
{
switch
(
expr
->
type
)
{
case
EXPR_ADD
:
case
EXPR_ADD
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_add
);
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_add
);
case
EXPR_AND
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_and
);
case
EXPR_BOOL
:
case
EXPR_BOOL
:
return
push_instr_int
(
ctx
,
OP_bool
,
((
bool_expression_t
*
)
expr
)
->
value
);
return
push_instr_int
(
ctx
,
OP_bool
,
((
bool_expression_t
*
)
expr
)
->
value
);
case
EXPR_CONCAT
:
case
EXPR_CONCAT
:
...
...
dlls/vbscript/interp.c
View file @
69de0798
...
@@ -564,6 +564,12 @@ static HRESULT interp_not(exec_ctx_t *ctx)
...
@@ -564,6 +564,12 @@ static HRESULT interp_not(exec_ctx_t *ctx)
return
stack_push
(
ctx
,
&
v
);
return
stack_push
(
ctx
,
&
v
);
}
}
static
HRESULT
interp_and
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
cmp_oper
(
exec_ctx_t
*
ctx
)
static
HRESULT
cmp_oper
(
exec_ctx_t
*
ctx
)
{
{
variant_val_t
l
,
r
;
variant_val_t
l
,
r
;
...
...
dlls/vbscript/parse.h
View file @
69de0798
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
typedef
enum
{
typedef
enum
{
EXPR_ADD
,
EXPR_ADD
,
EXPR_AND
,
EXPR_BOOL
,
EXPR_BOOL
,
EXPR_CONCAT
,
EXPR_CONCAT
,
EXPR_DIV
,
EXPR_DIV
,
...
...
dlls/vbscript/parser.y
View file @
69de0798
...
@@ -98,7 +98,7 @@ static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL);
...
@@ -98,7 +98,7 @@ static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL);
%type <statement> Statement StatementNl StatementsNl StatementsNl_opt IfStatement Else_opt
%type <statement> Statement StatementNl StatementsNl StatementsNl_opt IfStatement Else_opt
%type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression CallExpression
%type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression CallExpression
%type <expression> ConcatExpression AdditiveExpression ModExpression IntdivExpression MultiplicativeExpression ExpExpression
%type <expression> ConcatExpression AdditiveExpression ModExpression IntdivExpression MultiplicativeExpression ExpExpression
%type <expression> NotExpression UnaryExpression
%type <expression> NotExpression UnaryExpression
AndExpression
%type <member> MemberExpression
%type <member> MemberExpression
%type <expression> Arguments_opt ArgumentList_opt ArgumentList
%type <expression> Arguments_opt ArgumentList_opt ArgumentList
%type <bool> OptionExplicit_opt
%type <bool> OptionExplicit_opt
...
@@ -188,7 +188,11 @@ EmptyBrackets_opt
...
@@ -188,7 +188,11 @@ EmptyBrackets_opt
| tEMPTYBRACKETS
| tEMPTYBRACKETS
Expression
Expression
: NotExpression { $$ = $1; }
: AndExpression { $$ = $1; }
AndExpression
: NotExpression { $$ = $1; }
| AndExpression tAND NotExpression { $$ = new_binary_expression(ctx, EXPR_AND, $1, $3); CHECK_ERROR; }
NotExpression
NotExpression
: EqualityExpression { $$ = $1; }
: EqualityExpression { $$ = $1; }
...
...
dlls/vbscript/vbscript.h
View file @
69de0798
...
@@ -117,6 +117,7 @@ typedef enum {
...
@@ -117,6 +117,7 @@ typedef enum {
#define OP_LIST \
#define OP_LIST \
X(add, 1, 0, 0) \
X(add, 1, 0, 0) \
X(and, 1, 0, 0) \
X(assign_ident, 1, ARG_BSTR, 0) \
X(assign_ident, 1, ARG_BSTR, 0) \
X(assign_member, 1, ARG_BSTR, 0) \
X(assign_member, 1, ARG_BSTR, 0) \
X(bool, 1, ARG_INT, 0) \
X(bool, 1, ARG_INT, 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