public static function newFromTree(AASTTree $tree) { $obj = new AASTNodeList(); $obj->tree = $tree; $obj->list = array(0 => $tree->getRootNode()); $obj->ids = array(0 => 0); return $obj; }
public function __construct(array $tree, array $stream, $source) { $this->setTreeType('XHP'); $this->setNodeConstants(xhp_parser_node_constants()); $this->setTokenConstants(xhpast_parser_token_constants()); parent::__construct($tree, $stream, $source); }