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
17c5a250
Commit
17c5a250
authored
Aug 22, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Support unary + expressions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9b18772c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
parser.y
dlls/vbscript/parser.y
+1
-0
lang.vbs
dlls/vbscript/tests/lang.vbs
+8
-0
No files found.
dlls/vbscript/parser.y
View file @
17c5a250
...
@@ -366,6 +366,7 @@ UnaryExpression
...
@@ -366,6 +366,7 @@ UnaryExpression
| CallExpression { $$ = $1; }
| CallExpression { $$ = $1; }
| tNEW Identifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; }
| tNEW Identifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; }
| '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
| '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
| '+' UnaryExpression { $$ = $2; }
CallExpression
CallExpression
: PrimaryExpression { $$ = $1; }
: PrimaryExpression { $$ = $1; }
...
...
dlls/vbscript/tests/lang.vbs
View file @
17c5a250
...
@@ -1093,6 +1093,14 @@ Call ok(getVT(cs) = "VT_BSTR", "getVT(cs) = " & getVT(cs))
...
@@ -1093,6 +1093,14 @@ Call ok(getVT(cs) = "VT_BSTR", "getVT(cs) = " & getVT(cs))
Call
ok
(
isNull
(
cnull
),
"cnull = "
&
cnull
)
Call
ok
(
isNull
(
cnull
),
"cnull = "
&
cnull
)
Call
ok
(
getVT
(
cnull
)
=
"VT_NULL"
,
"getVT(cnull) = "
&
getVT
(
cnull
))
Call
ok
(
getVT
(
cnull
)
=
"VT_NULL"
,
"getVT(cnull) = "
&
getVT
(
cnull
))
Call
ok
(
+
1
=
1
,
"+1 != 1"
)
Call
ok
(
+
true
=
true
,
"+1 != 1"
)
Call
ok
(
getVT
(
+
true
)
=
"VT_BOOL"
,
"getVT(+true) = "
&
getVT
(
+
true
))
Call
ok
(
+
"true"
=
"true"
,
"
""
+true
""
!= true"
)
Call
ok
(
getVT
(
+
"true"
)
=
"VT_BSTR"
,
"getVT(+
""
true
""
) = "
&
getVT
(
+
"true"
))
Call
ok
(
+
obj
is
obj
,
"+obj != obj"
)
Call
ok
(
+--+-+
1
=
-
1
,
"+--+-+1 != -1"
)
if
false
then
Const
conststr
=
"str"
if
false
then
Const
conststr
=
"str"
Call
ok
(
conststr
=
"str"
,
"conststr = "
&
conststr
)
Call
ok
(
conststr
=
"str"
,
"conststr = "
&
conststr
)
Call
ok
(
getVT
(
conststr
)
=
"VT_BSTR"
,
"getVT(conststr) = "
&
getVT
(
conststr
))
Call
ok
(
getVT
(
conststr
)
=
"VT_BSTR"
,
"getVT(conststr) = "
&
getVT
(
conststr
))
...
...
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