jscript: Added support for '==' CC expression.

This commit is contained in:
Jacek Caban 2014-10-02 14:36:35 +02:00 committed by Alexandre Julliard
parent a0f038963b
commit d9e8c013c6
2 changed files with 10 additions and 1 deletions

View File

@ -181,7 +181,7 @@ CCBitwiseANDExpression
CCEqualityExpression
: CCRelationalExpression { $$ = $1; }
| CCEqualityExpression tEQ CCRelationalExpression
{ FIXME("'==' expression not implemented\n"); ctx->hres = E_NOTIMPL; YYABORT; }
{ $$ = ccval_bool(get_ccnum($1) == get_ccnum($3)); }
| CCEqualityExpression tNEQ CCRelationalExpression
{ $$ = ccval_bool(get_ccnum($1) != get_ccnum($3)); }
| CCEqualityExpression tEQEQ CCRelationalExpression

View File

@ -146,6 +146,15 @@ ok(@test === -1, "@test = " + @test);
@set @test = (true-@_jscript)
ok(@test === 0, "@test = " + @test);
@set @test = (true==1)
ok(@test === true, "@test = " + @test);
@set @test = (1==false+1)
ok(@test === true, "@test = " + @test);
@set @test = (1+true==false+1)
ok(@test === false, "@test = " + @test);
@if (false)
this wouldn not parse
"@end