UNPKG

esfuzz

Version:

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

43 lines (42 loc) 1.34 kB
// Generated by CoffeeScript 2.0.0-beta7 void function () { var cache$, CallExpression, construct, Expression, Identifier, listOf, Node; Node = require('../node'); Expression = require('../classes/Expression'); Identifier = require('./Identifier'); cache$ = require('../combinators'); construct = cache$.construct; listOf = cache$.listOf; CallExpression = function (super$) { extends$(CallExpression, super$); CallExpression.prototype.type = CallExpression.name; CallExpression.prototype['arguments'] = []; function CallExpression(depth, ancestors) { --depth; if (depth > 0) { ancestors = [this].concat(ancestors); this.callee = Expression(depth, ancestors); this['arguments'] = listOf([Expression])(depth, ancestors); } else { this.callee = Identifier(0); } } return CallExpression; }(Node); module.exports = construct(CallExpression); 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);