private function parseFieldDeclaration()
{
$declaration = $this->builder->buildAstFieldDeclaration();
$declaration->setComment($this->docComment);
$type = $this->parseFieldDeclarationType();
if ($type !== null) {
$declaration->addChild($type);
}
$this->consumeComments();
$tokenType = $this->tokenizer->peek();
while ($tokenType !== Tokenizer::T_EOF) {
$declaration->addChild($this->parseVariableDeclarator());
$this->consumeComments();
$tokenType = $this->tokenizer->peek();
if ($tokenType !== Tokens::T_COMMA) {
break;
}
$this->consumeToken(Tokens::T_COMMA);
$this->consumeComments();
$tokenType = $this->tokenizer->peek();
}
$this->setNodePositionsAndReturn($declaration);
$this->consumeToken(Tokens::T_SEMICOLON);
return $declaration;
}