php-parser
Version:
Parse PHP code from JS and returns its AST
26 lines (23 loc) • 644 B
JavaScript
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
;
const Expression = require("./expression");
const KIND = "yieldfrom";
/**
* Defines a yield from generator statement
* @constructor YieldFrom
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} value
* @see http://php.net/manual/en/language.generators.syntax.php
*/
module.exports = Expression.extends(
KIND,
function YieldFrom(value, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.value = value;
},
);