vbscript: Support unary + expressions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9b18772c0b
commit
17c5a25091
|
@ -366,6 +366,7 @@ UnaryExpression
|
|||
| CallExpression { $$ = $1; }
|
||||
| tNEW Identifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; }
|
||||
| '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
|
||||
| '+' UnaryExpression { $$ = $2; }
|
||||
|
||||
CallExpression
|
||||
: PrimaryExpression { $$ = $1; }
|
||||
|
|
|
@ -1093,6 +1093,14 @@ Call ok(getVT(cs) = "VT_BSTR", "getVT(cs) = " & getVT(cs))
|
|||
Call ok(isNull(cnull), "cnull = " & 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"
|
||||
Call ok(conststr = "str", "conststr = " & conststr)
|
||||
Call ok(getVT(conststr) = "VT_BSTR", "getVT(conststr) = " & getVT(conststr))
|
||||
|
|
Loading…
Reference in New Issue