mirror of
https://github.com/danog/phpdoc-parser.git
synced 2025-01-23 06:12:09 +01:00
SimpleNode -> IdentifierNode
This commit is contained in:
parent
b1b9011088
commit
e153c53294
@ -5,14 +5,14 @@ namespace PhpStan\TypeParser\Ast;
|
||||
|
||||
class GenericNode implements Node
|
||||
{
|
||||
/** @var SimpleNode */
|
||||
/** @var IdentifierNode */
|
||||
public $type;
|
||||
|
||||
/** @var Node[] */
|
||||
public $genericTypes;
|
||||
|
||||
|
||||
public function __construct(SimpleNode $type, array $genericTypes)
|
||||
public function __construct(IdentifierNode $type, array $genericTypes)
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->genericTypes = $genericTypes;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace PhpStan\TypeParser\Ast;
|
||||
|
||||
|
||||
class SimpleNode implements Node
|
||||
class IdentifierNode implements Node
|
||||
{
|
||||
/** @var string */
|
||||
public $name;
|
@ -97,7 +97,7 @@ class Parser
|
||||
}
|
||||
|
||||
} else {
|
||||
$type = new Ast\SimpleNode($this->value());
|
||||
$type = new Ast\IdentifierNode($this->value());
|
||||
$this->consume(Lexer::TOKEN_IDENTIFIER);
|
||||
|
||||
if ($this->tokenType === Lexer::TOKEN_OPEN_ANGLE_BRACKET) {
|
||||
@ -144,7 +144,7 @@ class Parser
|
||||
{
|
||||
$this->consume(Lexer::TOKEN_NULLABLE);
|
||||
|
||||
$type = new Ast\SimpleNode($this->value());
|
||||
$type = new Ast\IdentifierNode($this->value());
|
||||
$this->consume(Lexer::TOKEN_IDENTIFIER);
|
||||
|
||||
if ($this->tokenType === Lexer::TOKEN_OPEN_ANGLE_BRACKET) {
|
||||
@ -155,7 +155,7 @@ class Parser
|
||||
}
|
||||
|
||||
|
||||
private function parseGeneric(Ast\SimpleNode $baseType): Ast\Node
|
||||
private function parseGeneric(Ast\IdentifierNode $baseType): Ast\Node
|
||||
{
|
||||
$this->consume(Lexer::TOKEN_OPEN_ANGLE_BRACKET);
|
||||
$genericTypes[] = $this->parseType();
|
||||
|
Loading…
x
Reference in New Issue
Block a user