Lines Matching refs:channel

16  * channel, such as {@see Token::DEFAULT_CHANNEL} or
245 * that the seek target is always an on-channel token.
323 * Given a starting index, return the index of the next token on channel.
324 * Return `i` if `tokens[i]` is on channel. Return the index of the EOF
325 * token if there are no tokens on channel between `i` and EOF.
327 protected function nextTokenOnChannel(int $i, int $channel) : int
336 while ($token->getChannel() !== $channel) {
352 * Given a starting index, return the index of the previous token on channel.
353 * Return `i` if `tokens[i]` is on channel. Return -1 if there are no tokens
354 * on channel between `i` and 0.
358 * as though it were on every channel.
360 protected function previousTokenOnChannel(int $i, int $channel) : int
362 while ($i >= 0 && $this->tokens[$i]->getChannel() !== $channel) {
370 * Collect all tokens on specified channel to the right of the current token
371 * up until we see a token on DEFAULT_TOKEN_CHANNEL or EOF. If channel is -1,
372 * find any non default channel token.
376 public function getHiddenTokensToRight(int $tokenIndex, int $channel) : ?array
389 return $this->filterForChannel($from_, $to, $channel);
393 * Collect all tokens on specified channel to the left of the current token
394 * up until we see a token on DEFAULT_TOKEN_CHANNEL. If channel is -1, find
395 * any non default channel token.
399 public function getHiddenTokensToLeft(int $tokenIndex, int $channel) : ?array
413 // if none on channel to left, prevOnChannel=-1 then from=0
417 return $this->filterForChannel($from, $to, $channel);
423 protected function filterForChannel(int $left, int $right, int $channel) : ?array
429 if ($channel === -1) {
433 } elseif ($t->getChannel() === $channel) {