while (!
$stream->
test(/* Token::PUNCTUATION_TYPE */ 9, ']'
)) { if (!
$first) { $stream->
expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'An array element must be followed by a comma'
);
// trailing ,?
if ($stream->
test(/* Token::PUNCTUATION_TYPE */ 9, ']'
)) { break;
} } $first = false;
$node->
addElement($this->
parseExpression());
} $stream->
expect(/* Token::PUNCTUATION_TYPE */ 9, ']', 'An opened array is not properly closed'
);
return $node;
} public function parseHashExpression() { $stream =
$this->parser->
getStream();
$stream->
expect(/* Token::PUNCTUATION_TYPE */ 9, '{', 'A hash element was expected'
);