/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
var Statement = require('./statement');
var KIND = 'closure';
/**
* Defines a closure
* @constructor Closure
* @extends {Statement}
* @property {Parameter[]} arguments
* @property {Variable[]} uses
* @property {Identifier} type
* @property {boolean} byref
* @property {boolean} nullable
* @property {Block|null} body
*/
var Closure = Statement.extends(function Closure(args, byref, uses, type, nullable, location) {
Statement.apply(this, [KIND, location]);
this.uses = uses;
this.arguments = args;
this.byref = byref;
this.type = type;
this.nullable = nullable;
this.body = null;
});
module.exports = Closure;
|