jscript: Added support for '==' CC expression.
This commit is contained in:
parent
a0f038963b
commit
d9e8c013c6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue