* @return the list literal that was parsed
*/
private ListLiteral parseListLiteral(Token modifier, TypeArgumentList typeArguments) {
// may be empty list literal
if (matches(TokenType.INDEX)) {
BeginToken leftBracket = new BeginToken(
TokenType.OPEN_SQUARE_BRACKET,
currentToken.getOffset());
Token rightBracket = new Token(TokenType.CLOSE_SQUARE_BRACKET, currentToken.getOffset() + 1);
leftBracket.setEndToken(rightBracket);
rightBracket.setNext(currentToken.getNext());
leftBracket.setNext(rightBracket);
currentToken.getPrevious().setNext(leftBracket);
currentToken = currentToken.getNext();
return new ListLiteral(modifier, typeArguments, leftBracket, null, rightBracket);
}
// open