//TODO We should really care about the syntactic validity of objects we are ignoring but that seems like a bit too much effort
int openBraces = 1;
while (openBraces >= 1)
{
Token next = nextToken();
if (next.getType().equals(TokenType.LBRACE)) {
openBraces++;
} else if (next.getType().equals(TokenType.RBRACE)) {
openBraces--;
}
}
checkComma(TokenType.RBRACE);
} else if (lookingAt(TokenType.LBRACKET)) {
//Start of an Array
nextToken();
//TODO We should really care about the syntactic validity of objects we are ignoring but that seems like a bit too much effort
int openBraces = 1;
while (openBraces >= 1)
{
Token next = nextToken();
if (next.getType().equals(TokenType.LBRACKET)) {
openBraces++;
} else if (next.getType().equals(TokenType.RBRACKET)) {
openBraces--;
}
}
checkComma(TokenType.RBRACE);
} else {