コード例 #1
0
ファイル: Parser.php プロジェクト: xemlock/php-latex
 /**
  * @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;
 }
コード例 #2
0
ファイル: Node.php プロジェクト: xemlock/php-latex
 public function appendTo(PhpLatex_Node $parent)
 {
     $parent->appendChild($this);
     return $this;
 }