Exemple #1
0
 /**
  * Lexes text
  *
  * @param  Jstewmc\Stream\Stream  $stream  the character stream
  * @return  Jstewmc\Rtf\Token\Text
  * @since  0.2.0
  */
 protected function lexText(\Jstewmc\Stream\Stream $stream)
 {
     return Token\Text::createFromStream($stream);
 }
Exemple #2
0
 /**
  * Parses a text token
  *
  * @param  Jstewmc\Rtf\Token\Text     $token  a text token
  * @param  Jstewmc\Rtf\Element\Group  $group  the current group
  * @return  void
  * @since  0.1.0
  */
 protected function parseText(Token\Text $token, Element\Group $group)
 {
     $text = new Element\Text($token->getText());
     $text->setParent($group);
     $group->appendChild($text);
     return;
 }