Beispiel #1
0
 /**
  * Create new document node
  *
  * @param ezcDocumentRstToken $token
  * @param ezcDocumentRstStack $tokens
  * @return ezcDocumentRstDocumentNode
  */
 protected function shiftDocument(ezcDocumentRstToken $token, ezcDocumentRstStack $tokens)
 {
     // If there are any tokens left after the end of the file, something
     // went seriously wrong in the tokenizer.
     if (count($tokens)) {
         $this->triggerError(E_PARSE, 'Unexpected end of file.', null, $token->line, $token->position);
     }
     $this->documentStack->push(new ezcDocumentRstDocumentNode());
     return new ezcDocumentRstDocumentNode();
 }