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