return $this->
parsePostfixExpression($node);
} /**
* @return Node\ArrayNode
*/
public function parseArrayExpression() { $this->stream->
expect(Token::PUNCTUATION_TYPE, '[', 'An array element was expected'
);
$node =
new Node\
ArrayNode();
$first = true;
while (!
$this->stream->current->
test(Token::PUNCTUATION_TYPE, ']'
)) { if (!
$first) { $this->stream->
expect(Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma'
);
// trailing ,?
if ($this->stream->current->
test(Token::PUNCTUATION_TYPE, ']'
)) { break;
} } $first = false;