javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
function Test262Error() { Error.call(this); this.name = 'Test262Error'; }
Test262Error.prototype = Object.create(Error.prototype);
Test262Error.prototype.constructor = Test262Error;
let iter = {};
Object.defineProperty(iter, Symbol.iterator, {get: function(){ throw new Test262Error(); }});
function f([x]) {}
try {
  f(iter);
  console.log('NO_THROW');
} catch (e) {
  console.log('THREW', (e && e.name) || e);
}