/** * @param string $stopAtToken * @param string $state * @return array */ protected function _parseExprList(PhpLatex_Node $parent, $stopAtToken, $state, $environ = null) { $tree = array(); while (false !== ($token = $this->_peek())) { if ($token['value'] === $stopAtToken) { // consume terminating token $this->_next(); break; } $node = $this->_parseExpr($state, $environ); if ($node) { $parent->appendChild($node); } } return $tree; }
public function appendTo(PhpLatex_Node $parent) { $parent->appendChild($this); return $this; }