$expr =
new ConcatBinary($expr,
$node,
$node->
getTemplateLine());
} return $expr;
} public function parseArrayExpression() { $stream =
$this->parser->
getStream();
$stream->
expect(/* Token::PUNCTUATION_TYPE */ 9, '[', 'An array element was expected'
);
$node =
new ArrayExpression([],
$stream->
getCurrent()->
getLine());
$first = true;
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;