Lines Matching refs:tokens
17 public function emulate(string $code, array $tokens): array { argument
18 for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
19 $token = $tokens[$i];
21 isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING &&
22 preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text)
24 $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text);
25 array_splice($tokens, $i, 2, [
26 new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos),
31 return $tokens;
41 public function reverseEmulate(string $code, array $tokens): array { argument
43 return $tokens;