Lines Matching defs:tokenIndex
376 public function getHiddenTokensToRight(int $tokenIndex, int $channel) : ?array
380 if ($tokenIndex < 0 || $tokenIndex >= \count($this->tokens)) {
381 throw new \RuntimeException(\sprintf('%d not in 0..%d', $tokenIndex, \count($this->tokens) - 1));
384 $nextOnChannel = $this->nextTokenOnChannel($tokenIndex + 1, Lexer::DEFAULT_TOKEN_CHANNEL);
385 $from_ = $tokenIndex + 1;
399 public function getHiddenTokensToLeft(int $tokenIndex, int $channel) : ?array
403 if ($tokenIndex < 0 || $tokenIndex >= \count($this->tokens)) {
404 throw new \RuntimeException(\sprintf('%d not in 0..%d', $tokenIndex, \count($this->tokens) - 1));
407 $prevOnChannel = $this->previousTokenOnChannel($tokenIndex - 1, Lexer::DEFAULT_TOKEN_CHANNEL);
409 if ($prevOnChannel === $tokenIndex - 1) {
415 $to = $tokenIndex - 1;