Commit d9e8c013 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent a0f03896
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment