forked from glayzzle/php-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclosure.js
More file actions
33 lines (31 loc) · 882 Bytes
/
closure.js
File metadata and controls
33 lines (31 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*!
* 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
* @property {boolean} isStatic
*/
var Closure = Statement.extends(function Closure(args, byref, uses, type, nullable, isStatic, location) {
Statement.apply(this, [KIND, location]);
this.uses = uses;
this.arguments = args;
this.byref = byref;
this.type = type;
this.nullable = nullable;
this.isStatic = isStatic || false;
this.body = null;
});
module.exports = Closure;