Debian Codegraph @

vendor/mck89/peast/lib/Peast/Syntax/Node/ForOfStatement.php

raw
1 <?php
2 /**
3 * This file is part of the Peast package
4 *
5 * (c) Marco Marchiò <[email protected]>
6 *
7 * For the full copyright and license information refer to the LICENSE file
8 * distributed with this source code
9 */
10 namespace Peast\Syntax\Node;
11
12 /**
13 * A node that represents the "for...of" statement.
14 * For example: for (var a of b) {}
15 *
16 * @author Marco Marchiò <[email protected]>
17 */
18 class ForOfStatement extends ForInStatement
19 {
20 /**
21 * Map of node properties
22 *
23 * @var array
24 */
25 protected $propertiesMap = array(
26 "left" => true,
27 "right" => true,
28 "body" => true,
29 "await" => false
30 );
31
32 /**
33 * Async iteration flag
34 *
35 * @var bool
36 */
37 protected $await = false;
38
39 /**
40 * Returns the async iteration flag
41 *
42 * @return bool
43 */
44 public function getAwait()
45 {
46 return $this->await;
47 }
48
49 /**
50 * Sets the async iteration flag
51 *
52 * @param bool $await Async iteration flag
53 *
54 * @return $this
55 */
56 public function setAwait($await)
57 {
58 $this->await = (bool) $await;
59 return $this;
60 }
61 }