private function parseDeclareList(ASTDeclareStatement $stmt)
{
$this->consumeComments();
$this->consumeToken(Tokens::T_PARENTHESIS_OPEN);
while (true) {
$this->consumeComments();
$name = $this->consumeToken(Tokens::T_STRING)->image;
$this->consumeComments();
$this->consumeToken(Tokens::T_EQUAL);
$this->consumeComments();
$value = $this->parseStaticValue();
$stmt->addValue($name, $value);
$this->consumeComments();
if ($this->tokenizer->peek() === Tokens::T_COMMA) {
$this->consumeToken(Tokens::T_COMMA);
continue;
}
break;
}
$this->consumeToken(Tokens::T_PARENTHESIS_CLOSE);
return $stmt;
}