/PHP-Parser/test/code/prettyPrinter/ |
H A D | comments.test | 7 // Some text 8 # Some text 9 /* Some text */ 10 /** Some text */ 12 * Some text. 16 * Some text. 23 /* Some text. 25 /* Some text. 26 More text. 33 // Some text [all …]
|
/PHP-Parser/lib/PhpParser/ |
H A D | Comment.php | 6 protected string $text; variable in PhpParser\\Comment 23 string $text, argument 27 $this->text = $text; 42 return $this->text; 107 return $this->text; 121 $text = str_replace("\r\n", "\n", $this->text); 122 $newlinePos = strpos($text, "\n"); 125 return $text; 138 if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { 167 return $text; [all …]
|
H A D | Token.php | 11 return $this->pos + \strlen($this->text); 16 return $this->line + \substr_count($this->text, "\n");
|
H A D | Lexer.php | 42 $chr = $token->text; 62 && substr($token->text, 0, 2) === '/*' 63 && substr($token->text, -2) !== '*/';
|
H A D | ParserAbstract.php | 255 $tokenValue = $token->text; 896 ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, 898 : new Comment($token->text, $token->line, $token->pos, $tokenPos, 955 return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; 965 return false !== strpos($prevToken->text, "\n") 966 || false !== strpos($prevToken->text, "\r");
|
H A D | PrettyPrinterAbstract.php | 1257 $text = $this->origTokens->getTokenCode($pos, $endPos, 0); 1258 if (false === strpos($text, "\n")) {
|
/PHP-Parser/lib/PhpParser/Internal/ |
H A D | TokenPolyfill.php | 22 public string $text; variable in PhpParser\\Internal\\TokenPolyfill 44 $this->text = $text; 74 return $this->text === $kind; 83 if ($this->text === $entry) { 110 return $this->text; 146 $text = $token[1]; 153 $text = \substr($text, 0, -\strlen($trailingNewline)); 155 $pos += \strlen($text); 173 $newText = $text; 210 $line += \substr_count($text, "\n"); [all …]
|
H A D | TokenStream.php | 229 $text = $token->text; 231 $result .= $text; 235 $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); 237 $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); 239 $result .= $text; 258 $content = $token->text; 263 $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") {
|
/PHP-Parser/lib/PhpParser/Lexer/TokenEmulator/ |
H A D | ExplicitOctalEmulator.php | 20 if ($token->id == \T_LNUMBER && $token->text === '0' && 22 preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) 24 $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); 26 new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos),
|
H A D | NullsafeTokenEmulator.php | 22 …if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { 33 … && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) 40 if ($matchLen !== \strlen($token->text)) { 43 \substr($token->text, $matchLen),
|
H A D | AsymmetricVisibilityTokenEmulator.php | 27 if (isset($map[$token->id]) && $i + 3 < $c && $tokens[$i + 1]->text === '(' && 28 $tokens[$i + 2]->id === \T_STRING && \strtolower($tokens[$i + 2]->text) === 'set' && 29 $tokens[$i + 3]->text === ')' && 34 $map[$token->id], $token->text . '(' . $tokens[$i + 2]->text . ')', 53 \preg_match('/(public|protected|private)\((set)\)/i', $token->text, $matches)
|
H A D | ReadonlyTokenEmulator.php | 26 ($tokens[$pos + 1]->text === '(' || 29 $tokens[$pos + 2]->text === '(')));
|
H A D | AttributeEmulator.php | 22 if ($token->text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') {
|
H A D | KeywordEmulator.php | 28 if ($token->id === T_STRING && strtolower($token->text) === $keywordString
|
/PHP-Parser/lib/PhpParser/Lexer/ |
H A D | Emulative.php | 143 $len = \strlen($token->text); 154 $token->text = substr_replace( 155 $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen 162 $token->text = substr_replace( 163 $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 169 $token->text = substr_replace( 170 $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen
|
/PHP-Parser/test/PhpParser/ |
H A D | TokenTest.php | 26 public function testIsIgnorable(int $id, string $text, bool $isIgnorable): void { argument 27 $token = new Token($id, $text);
|
H A D | LexerTest.php | 69 $this->assertSame($expectedToken[1], $token->text);
|
/PHP-Parser/lib/PhpParser/NodeVisitor/ |
H A D | CommentAnnotatingVisitor.php | 50 $token->text, $token->line, $token->pos, $pos, 56 $token->text, $token->line, $token->pos, $pos,
|
/PHP-Parser/doc/component/ |
H A D | JSON_representation.markdown | 43 "text": "\/** @param string $msg *\/",
|
H A D | Lexer.markdown | 48 public string $text; 54 /** @param int|string|(int|string)[] $kind Token ID or text (or array of them) */
|
/PHP-Parser/test/PhpParser/Lexer/ |
H A D | EmulativeTest.php | 127 $reducedTokens[] = [$token->id, $token->text];
|
/PHP-Parser/ |
H A D | UPGRADE-5.0.md | 480 public string $text;
|