Lines Matching refs:expectedTokens
79 * @param array|integer|string $expectedTokens
83 protected function read($expectedTokens): Scanner\Token { argument
85 if (!is_array($expectedTokens)) {
86 return $this->read(array($expectedTokens));
89 foreach($expectedTokens as $token) {
96 throw $this->handleMismatch($expectedTokens);
122 * @param array|integer|string $expectedTokens
129 $expectedTokens, int $position = 0, bool $allowEndOfTokens = FALSE argument
132 if (!is_array($expectedTokens)) {
133 return $this->lookahead(array($expectedTokens), $position, $allowEndOfTokens);
142 foreach($expectedTokens as $token) {
149 throw $this->handleMismatch($expectedTokens, $position);
179 * @param array|integer|string $expectedTokens
183 protected function ignore($expectedTokens): bool { argument
185 if (!is_array($expectedTokens)) {
186 return $this->ignore(array($expectedTokens));
194 foreach ($expectedTokens as $token) {
257 * @param array() $expectedTokens
261 private function handleMismatch($expectedTokens, $position = 0) { argument
264 return new Exception\UnexpectedEndOfFileException($expectedTokens);
268 return new Exception\TokenMismatchException($this->_tokens[$position], $expectedTokens);