Lines Matching refs:tokenPos

136     protected int $tokenPos;  variable in PhpParser\\ParserAbstract
224 $this->tokenPos = -1;
250 $token = $this->tokens[++$this->tokenPos];
287 $this->tokenStartStack[$stackPos] = $this->tokenPos;
288 $this->tokenEndStack[$stackPos] = $this->tokenPos;
329 $e->setStartLine($this->tokens[$this->tokenPos]->line);
354 $this->tokenStartStack[$stackPos] = $this->tokenPos;
361 … $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos)));
390 $this->tokenStartStack[$stackPos] = $this->tokenPos;
497 protected function getAttributesForToken(int $tokenPos): array { argument
498 if ($tokenPos < \count($this->tokens) - 1) {
499 return $this->getAttributes($tokenPos, $tokenPos);
503 $token = $this->tokens[$tokenPos];
506 'startTokenPos' => $tokenPos,
509 'endTokenPos' => $tokenPos,
891 protected function createCommentFromToken(Token $token, int $tokenPos): Comment { argument
894 ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos,
895 $token->getEndLine(), $token->getEndPos() - 1, $tokenPos)
896 : new Comment($token->text, $token->line, $token->pos, $tokenPos,
897 $token->getEndLine(), $token->getEndPos() - 1, $tokenPos);
903 protected function getCommentBeforeToken(int $tokenPos): ?Comment { argument
904 while (--$tokenPos >= 0) {
905 $token = $this->tokens[$tokenPos];
911 return $this->createCommentFromToken($token, $tokenPos);
920 protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { argument
921 $comment = $this->getCommentBeforeToken($tokenPos);
949 $nextToken = $this->tokens[$this->tokenPos + 1];
950 $this->tokenPos = \count($this->tokens) - 2;
957 $tokenPos = $this->tokenStartStack[$stackPos];
958 $token = $this->tokens[$tokenPos];
960 if ($tokenPos > 0) {
961 $prevToken = $this->tokens[$tokenPos - 1];
972 protected function createEmptyElemAttributes(int $tokenPos): array { argument
973 return $this->getAttributesForToken($tokenPos);