Lines Matching refs:tokens
58 protected $tokens = []; variable in PHP_Token_Stream
120 $this->tokens = [];
155 $tokens = token_get_all($sourceCode);
156 $numTokens = count($tokens);
161 $token = $tokens[$i];
170 … } elseif ($name == 'USE' && isset($tokens[$i + 2][0]) && $tokens[$i + 2][0] == T_FUNCTION) {
172 $text .= $tokens[$i + 1][1] . $tokens[$i + 2][1];
182 $this->tokens[] = new $tokenClass($text, $line, $this, $id++);
212 return count($this->tokens);
218 public function tokens() function in PHP_Token_Stream
220 return $this->tokens;
305 foreach ($this->tokens as $token) {
360 foreach ($this->tokens as $token) {
490 return isset($this->tokens[$this->position]);
506 return $this->tokens[$this->position];
523 return isset($this->tokens[$offset]);
544 return $this->tokens[$offset];
553 $this->tokens[$offset] = $value;
572 unset($this->tokens[$offset]);