Ejemplo n.º 1
0
 /**
  * @return Tokenizer
  */
 private function tokenizeInternal() : Tokenizer
 {
     do {
         $this->stream->ignoreWhitespace();
         if ($this->stream->currentAscii()->is(AsciiChar::DOLLAR)) {
             $this->stream->next();
             $this->extractGlobalVariable();
         } elseif ($this->stream->currentAscii()->is(AsciiChar::SEMICOLON)) {
             $this->ignoreComment();
         } else {
             $this->extractRecord();
             $this->stream->ignoreWhitespace();
         }
     } while (!$this->stream->isEnd());
     return $this;
 }