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
43f6a684
Commit
43f6a684
authored
Sep 12, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added '<>' expression implementation.
parent
324aadd2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
0 deletions
+26
-0
compile.c
dlls/vbscript/compile.c
+2
-0
interp.c
dlls/vbscript/interp.c
+16
-0
parse.h
dlls/vbscript/parse.h
+1
-0
parser.y
dlls/vbscript/parser.y
+1
-0
lang.vbs
dlls/vbscript/tests/lang.vbs
+5
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/compile.c
View file @
43f6a684
...
...
@@ -250,6 +250,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return
compile_member_expression
(
ctx
,
(
member_expression_t
*
)
expr
,
TRUE
);
case
EXPR_NEG
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_neg
);
case
EXPR_NEQUAL
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_nequal
);
case
EXPR_NOT
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_not
);
case
EXPR_NULL
:
...
...
dlls/vbscript/interp.c
View file @
43f6a684
...
...
@@ -367,6 +367,22 @@ static HRESULT interp_equal(exec_ctx_t *ctx)
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_nequal
(
exec_ctx_t
*
ctx
)
{
VARIANT
v
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
cmp_oper
(
ctx
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
&
v
)
=
VT_BOOL
;
V_BOOL
(
&
v
)
=
hres
!=
VARCMP_EQ
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_concat
(
exec_ctx_t
*
ctx
)
{
variant_val_t
r
,
l
;
...
...
dlls/vbscript/parse.h
View file @
43f6a684
...
...
@@ -25,6 +25,7 @@ typedef enum {
EXPR_EQUAL
,
EXPR_MEMBER
,
EXPR_NEG
,
EXPR_NEQUAL
,
EXPR_NOT
,
EXPR_NULL
,
EXPR_STRING
,
...
...
dlls/vbscript/parser.y
View file @
43f6a684
...
...
@@ -139,6 +139,7 @@ NotExpression
EqualityExpression
: ConcatExpression { $$ = $1; }
| EqualityExpression '=' ConcatExpression { $$ = new_binary_expression(ctx, EXPR_EQUAL, $1, $3); CHECK_ERROR; }
| EqualityExpression tNEQ ConcatExpression { $$ = new_binary_expression(ctx, EXPR_NEQUAL, $1, $3); CHECK_ERROR; }
ConcatExpression
: AdditiveExpression { $$ = $1; }
...
...
dlls/vbscript/tests/lang.vbs
View file @
43f6a684
...
...
@@ -40,6 +40,11 @@ Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
Call
ok
(
--
1
=
1
,
"--1 = "
&
--
1
)
Call
ok
(
-
empty
=
0
,
"-empty = "
&
(
-
empty
))
Call
ok
(
true
<>
false
,
"true <> false is false"
)
Call
ok
(
not
(
true
<>
true
),
"true <> true is true"
)
Call
ok
(
not
(
"x"
<>
"x"
),
"
""
x
""
<>
""
x
""
is true"
)
Call
ok
(
not
(
empty
<>
empty
),
"empty <> empty is true"
)
Call
ok
(
getVT
(
false
)
=
"VT_BOOL"
,
"getVT(false) is not VT_BOOL"
)
Call
ok
(
getVT
(
true
)
=
"VT_BOOL"
,
"getVT(true) is not VT_BOOL"
)
Call
ok
(
getVT
(
""
)
=
"VT_BSTR"
,
"getVT(
""""
) is not VT_BSTR"
)
...
...
dlls/vbscript/vbscript.h
View file @
43f6a684
...
...
@@ -98,6 +98,7 @@ typedef enum {
X(icallv, 1, ARG_BSTR, ARG_UINT) \
X(long, 1, ARG_INT, 0) \
X(neg, 1, 0, 0) \
X(nequal, 1, 0, 0) \
X(not, 1, 0, 0) \
X(null, 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