/PHP-Parser/lib/PhpParser/Internal/ |
H A D | TokenStream.php | 63 $pos--; 64 for (; $pos >= 0; $pos--) { 88 $pos++; 89 for ($c = \count($tokens); $pos < $c; $pos++) { 105 $pos = $this->skipLeftWhitespace($pos); 114 $pos--; 123 $pos = $this->skipRightWhitespace($pos); 132 $pos++; 145 for (; $pos >= 0; $pos--) { 190 for ($pos = $startPos; $pos < $endPos; $pos++) { [all …]
|
H A D | TokenPolyfill.php | 26 public int $pos; variable in PhpParser\\Internal\\TokenPolyfill 46 $this->pos = $pos; 129 $pos = 0; 139 $pos += 2; 142 $pos++; 154 $tokens[] = new static($id, $text, $line, $pos); 155 $pos += \strlen($text); 165 $pos += \strlen($trailingNewline); 203 $pos += \strlen($newText); 209 $tokens[] = new static($id, $text, $line, $pos); [all …]
|
/PHP-Parser/lib/PhpParser/NodeVisitor/ |
H A D | CommentAnnotatingVisitor.php | 12 private int $pos = 0; variable in PhpParser\\NodeVisitor\\CommentAnnotatingVisitor 42 $oldPos = $this->pos; 43 $this->pos = $pos = $node->getStartTokenPos(); 44 if ($nextCommentPos > $oldPos && $nextCommentPos < $pos) { 46 while (--$pos >= $oldPos) { 47 $token = $this->tokens[$pos]; 50 $token->text, $token->line, $token->pos, $pos, 51 $token->getEndLine(), $token->getEndPos() - 1, $pos); 56 $token->text, $token->line, $token->pos, $pos, 57 $token->getEndLine(), $token->getEndPos() - 1, $pos); [all …]
|
/PHP-Parser/lib/PhpParser/Lexer/TokenEmulator/ |
H A D | ReadonlyTokenEmulator.php | 20 protected function isKeywordContext(array $tokens, int $pos): bool { argument 21 if (!parent::isKeywordContext($tokens, $pos)) { 25 return !(isset($tokens[$pos + 1]) && 26 ($tokens[$pos + 1]->text === '(' || 27 ($tokens[$pos + 1]->id === \T_WHITESPACE && 28 isset($tokens[$pos + 2]) && 29 $tokens[$pos + 2]->text === '(')));
|
H A D | AttributeEmulator.php | 24 new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), 40 $pos = 0; 41 while (false !== $pos = strpos($code, '#[', $pos)) { 43 $code[$pos] = '%'; 44 $patches[] = [$pos, 'replace', '#']; 45 $pos += 2;
|
H A D | EnumTokenEmulator.php | 20 protected function isKeywordContext(array $tokens, int $pos): bool { argument 21 return parent::isKeywordContext($tokens, $pos) 22 && isset($tokens[$pos + 2]) 23 && $tokens[$pos + 1]->id === \T_WHITESPACE 24 && $tokens[$pos + 2]->id === \T_STRING;
|
H A D | AsymmetricVisibilityTokenEmulator.php | 35 $token->line, $token->pos), 58 new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), 59 new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), 60 new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), 61 new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4), 72 protected function isKeywordContext(array $tokens, int $pos): bool { argument 73 $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos);
|
H A D | NullsafeTokenEmulator.php | 24 new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), 36 new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), 37 new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), 44 $token->line, $token->pos + $matchLen
|
H A D | KeywordEmulator.php | 16 protected function isKeywordContext(array $tokens, int $pos): bool { argument 17 $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos);
|
H A D | ExplicitOctalEmulator.php | 26 new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos),
|
/PHP-Parser/lib/PhpParser/ |
H A D | Error.php | 144 * @param int $pos 0-based position in $code 148 private function toColumn(string $code, int $pos): int { argument 149 if ($pos > strlen($code)) { 153 $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); 158 return $pos - $lineStartPos;
|
H A D | Lexer.php | 55 'startFilePos' => $token->pos, 56 'endFilePos' => $token->pos, 108 'startFilePos' => $lastToken->pos,
|
H A D | Token.php | 11 return $this->pos + \strlen($this->text);
|
H A D | PrettyPrinterAbstract.php | 571 $pos = 0; 644 $pos = $startPos; 679 $pos = $this->origTokens->findRight($pos, $findToken); 759 $pos = $subEndPos + 1; 929 $itemStartPos = $pos; 930 $itemEndPos = $pos - 1; 988 $pos = $itemEndPos + 1; 1005 $pos = $insertPos; 1249 $pos = -1; 1256 if ($pos >= 0) { [all …]
|
H A D | NodeDumper.php | 287 private function toColumn(string $code, int $pos): int { argument 288 if ($pos > strlen($code)) { 292 $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); 297 return $pos - $lineStartPos;
|
H A D | ParserAbstract.php | 485 'startFilePos' => $startToken->pos, 488 'endFilePos' => $afterEndToken->pos - 1, 507 'startFilePos' => $token->pos, 510 'endFilePos' => $token->pos, 894 ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, 896 : new Comment($token->text, $token->line, $token->pos, $tokenPos,
|
/PHP-Parser/lib/PhpParser/Node/ |
H A D | Name.php | 52 if (false !== $pos = \strpos($this->name, '\\')) { 53 return \substr($this->name, 0, $pos); 64 if (false !== $pos = \strrpos($this->name, '\\')) { 65 return \substr($this->name, $pos + 1); 178 if (false !== $pos = \strpos($this->name, '\\')) { 179 return new static(\substr($this->name, $pos + 1));
|
/PHP-Parser/lib/PhpParser/Lexer/ |
H A D | Emulative.php | 139 $pos = $token->pos; 140 $token->pos += $posDelta; 144 while ($patchPos >= $pos && $patchPos < $pos + $len) { 147 if ($patchPos === $pos && $patchTextLen === $len) { 155 $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen 163 $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 170 $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen
|
/PHP-Parser/doc/component/ |
H A D | Lexer.markdown | 52 public int $pos;
|
/PHP-Parser/ |
H A D | UPGRADE-5.0.md | 482 public int $pos;
|