Home
last modified time | relevance | path

Searched refs:text (Results 1 – 22 of 22) sorted by relevance

/PHP-Parser/test/code/prettyPrinter/
H A Dcomments.test7 // 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 DComment.php6 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 DToken.php11 return $this->pos + \strlen($this->text);
16 return $this->line + \substr_count($this->text, "\n");
H A DLexer.php42 $chr = $token->text;
62 && substr($token->text, 0, 2) === '/*'
63 && substr($token->text, -2) !== '*/';
H A DParserAbstract.php255 $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 DPrettyPrinterAbstract.php1257 $text = $this->origTokens->getTokenCode($pos, $endPos, 0);
1258 if (false === strpos($text, "\n")) {
/PHP-Parser/lib/PhpParser/Internal/
H A DTokenPolyfill.php22 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 DTokenStream.php229 $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 DExplicitOctalEmulator.php20 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 DNullsafeTokenEmulator.php22 …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 DAsymmetricVisibilityTokenEmulator.php27 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 DReadonlyTokenEmulator.php26 ($tokens[$pos + 1]->text === '(' ||
29 $tokens[$pos + 2]->text === '(')));
H A DAttributeEmulator.php22 if ($token->text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') {
H A DKeywordEmulator.php28 if ($token->id === T_STRING && strtolower($token->text) === $keywordString
/PHP-Parser/lib/PhpParser/Lexer/
H A DEmulative.php143 $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 DTokenTest.php26 public function testIsIgnorable(int $id, string $text, bool $isIgnorable): void { argument
27 $token = new Token($id, $text);
H A DLexerTest.php69 $this->assertSame($expectedToken[1], $token->text);
/PHP-Parser/lib/PhpParser/NodeVisitor/
H A DCommentAnnotatingVisitor.php50 $token->text, $token->line, $token->pos, $pos,
56 $token->text, $token->line, $token->pos, $pos,
/PHP-Parser/doc/component/
H A DJSON_representation.markdown43 "text": "\/** @param string $msg *\/",
H A DLexer.markdown48 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 DEmulativeTest.php127 $reducedTokens[] = [$token->id, $token->text];
/PHP-Parser/
H A DUPGRADE-5.0.md480 public string $text;

Completed in 51 milliseconds