esfuzz
Version:
JS fuzzer for generative testing of parsers that implement the SpiderMonkey Reflect.parse API
39 lines (38 loc) • 1.12 kB
JavaScript
// Generated by CoffeeScript 2.0.0-beta7
void function () {
var cache$, construct, listOfAtLeast, Node, Program, Statement;
Node = require('../node');
Statement = require('../classes/Statement');
cache$ = require('../combinators');
construct = cache$.construct;
listOfAtLeast = cache$.listOfAtLeast;
Program = function (super$) {
extends$(Program, super$);
Program.prototype.type = Program.name;
Program.prototype.body = [];
function Program(depth) {
var ancestors;
--depth;
ancestors = [this];
if (depth > 0)
this.body = listOfAtLeast(1, [Statement])(depth, ancestors);
}
return Program;
}(Node);
module.exports = construct(Program);
function isOwn$(o, p) {
return {}.hasOwnProperty.call(o, p);
}
function extends$(child, parent) {
for (var key in parent)
if (isOwn$(parent, key))
child[key] = parent[key];
function ctor() {
this.constructor = child;
}
ctor.prototype = parent.prototype;
child.prototype = new ctor;
child.__super__ = parent.prototype;
return child;
}
}.call(this);