Example #1
0
 protected function addToken(ReaderInterface $reader, Token $token)
 {
     $token->setLine($reader->getCurrentLine());
     $token->setRow($reader->getCurrentColumn());
     if ($token = $this->applyFilters($token)) {
         $this->queue->add($token);
     }
 }
Example #2
0
 public function testIsEofEmptyQueue()
 {
     $queue = new TokenQueue();
     $this->assertTrue($queue->isEof());
     $queue->add(new Token(0, 'token'));
     $this->assertFalse($queue->isEof());
 }