UNPKG

esfuzz

Version:

JS fuzzer for generative testing of parsers that implement the SpiderMonkey Reflect.parse API

38 lines (37 loc) 1.01 kB
// Generated by CoffeeScript 2.0.0-beta7 void function () { var Node, randomInt, String_; Node = require('../node'); randomInt = require('../random').randomInt; String_ = function (super$) { extends$(String_, super$); String_.prototype.type = 'Literal'; function String_() { this.value = function (accum$) { while (Math.random() < .9) { accum$.push(String.fromCharCode(32 + randomInt(94))); } return accum$; }.call(this, []).join(''); } return String_; }(Node); module.exports = function () { return new String_; }; 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);