forked from glayzzle/php-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforeach.js
More file actions
31 lines (28 loc) · 830 Bytes
/
foreach.js
File metadata and controls
31 lines (28 loc) · 830 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
/*!
* 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 = 'foreach';
/**
* Defines a foreach iterator
* @constructor Foreach
* @extends {Statement}
* @property {Expression} source
* @property {Expression|null} key
* @property {Expression} value
* @property {Statement} body
* @property {boolean} shortForm
* @see http://php.net/manual/en/control-structures.foreach.php
*/
var Foreach = Statement.extends(function Foreach(source, key, value, body, shortForm, location) {
Statement.apply(this, [KIND, location]);
this.source = source;
this.key = key;
this.value = value;
this.shortForm = shortForm;
this.body = body;
});
module.exports = Foreach;