Ejemplo n.º 1
0
 public function parseTokenSequence(TokenSequencerInterface $tokens)
 {
     $sequence = $tokens->getSequence();
     $type = $tokens->getType();
     $position = $this->parseTokens($type, $sequence);
     if (!empty($sequence[$position])) {
         throw new TokenParseException("Unexpected tokens at the end of the sequence. Reached position {$position} of " . count($sequence));
     }
 }