function PhpDocParser::parseChild
@phpstan-impure
2 calls to PhpDocParser::parseChild()
- PhpDocParser::parse in vendor/
phpstan/ phpdoc-parser/ src/ Parser/ PhpDocParser.php - PhpDocParser::parseOptionalDescriptionAfterDoctrineTag in vendor/
phpstan/ phpdoc-parser/ src/ Parser/ PhpDocParser.php
File
-
vendor/
phpstan/ phpdoc-parser/ src/ Parser/ PhpDocParser.php, line 167
Class
- PhpDocParser
- @phpstan-import-type ValueType from Doctrine\DoctrineArgument as DoctrineValueType
Namespace
PHPStan\PhpDocParser\ParserCode
private function parseChild(TokenIterator $tokens) : Ast\PhpDoc\PhpDocChildNode {
if ($tokens->isCurrentTokenType(Lexer::TOKEN_PHPDOC_TAG)) {
$startLine = $tokens->currentTokenLine();
$startIndex = $tokens->currentTokenIndex();
return $this->enrichWithAttributes($tokens, $this->parseTag($tokens), $startLine, $startIndex);
}
if ($tokens->isCurrentTokenType(Lexer::TOKEN_DOCTRINE_TAG)) {
$startLine = $tokens->currentTokenLine();
$startIndex = $tokens->currentTokenIndex();
$tag = $tokens->currentTokenValue();
$tokens->next();
$tagStartLine = $tokens->currentTokenLine();
$tagStartIndex = $tokens->currentTokenIndex();
return $this->enrichWithAttributes($tokens, new Ast\PhpDoc\PhpDocTagNode($tag, $this->enrichWithAttributes($tokens, $this->parseDoctrineTagValue($tokens, $tag), $tagStartLine, $tagStartIndex)), $startLine, $startIndex);
}
$startLine = $tokens->currentTokenLine();
$startIndex = $tokens->currentTokenIndex();
$text = $this->parseText($tokens);
return $this->enrichWithAttributes($tokens, $text, $startLine, $startIndex);
}