File tree 2 files changed +48
-0
lines changed
2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*!
2
+ * Copyright (C) 2017 Glayzzle (BSD3 License)
3
+ * @authors https://github.com/glayzzle/php-parser/graphs/contributors
4
+ * @url http://glayzzle.com
5
+ */
6
+ "use strict" ;
7
+
8
+ var Expression = require ( './expression' ) ;
9
+ var KIND = 'yield' ;
10
+
11
+ /**
12
+ * Defines a yield generator statement
13
+ * @constructor Yield
14
+ * @extends {Expression }
15
+ * @property {Expression|Null } value
16
+ * @property {Expression|Null } key
17
+ * @see http://php.net/manual/en/language.generators.syntax.php
18
+ */
19
+ var Yield = Expression . extends ( function Yield ( value , key , location ) {
20
+ Expression . apply ( this , [ KIND , location ] ) ;
21
+ this . value = value ;
22
+ this . key = key ;
23
+ } ) ;
24
+
25
+ module . exports = Yield ;
Original file line number Diff line number Diff line change
1
+ /*!
2
+ * Copyright (C) 2017 Glayzzle (BSD3 License)
3
+ * @authors https://github.com/glayzzle/php-parser/graphs/contributors
4
+ * @url http://glayzzle.com
5
+ */
6
+ "use strict" ;
7
+
8
+ var Expression = require ( './expression' ) ;
9
+ var KIND = 'yieldfrom' ;
10
+
11
+ /**
12
+ * Defines a yield from generator statement
13
+ * @constructor YieldFrom
14
+ * @extends {Expression }
15
+ * @property {Expression } value
16
+ * @see http://php.net/manual/en/language.generators.syntax.php
17
+ */
18
+ var YieldFrom = Expression . extends ( function YieldFrom ( value , location ) {
19
+ Expression . apply ( this , [ KIND , location ] ) ;
20
+ this . value = value ;
21
+ } ) ;
22
+
23
+ module . exports = YieldFrom ;
You can’t perform that action at this time.
0 commit comments