summaryrefslogtreecommitdiff
path: root/js/src/tests/js1_8_5/reflect-parse/expressionClosures.js
blob: 3f95a0d2ad2ec0da831d57cad6c67d776a4d0b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
// |reftest| skip-if(!xulRuntime.shell)
function test() {

// expression closures

assertDecl("function inc(x) (x + 1)", funDecl(ident("inc"), [ident("x")], binExpr("+", ident("x"), lit(1))));
assertExpr("(function(x) (x+1))", funExpr(null, [ident("x")], binExpr("+"), ident("x"), lit(1)));

}

runtest(test);