// Validate range variable declaration
if (expression.hasRangeVariableDeclaration()) {
// More than one entity abstract schema type is declared
CollectionExpression collectionExpression = getCollectionExpression(expression.getRangeVariableDeclaration());
if (collectionExpression != null) {
Expression firstChild = collectionExpression.getChild(0);
int startPosition = position(firstChild) + length(firstChild);
int endPosition = position(collectionExpression) + length(collectionExpression);
boolean malformed = false;
for (int index = collectionExpression.childrenSize() - 1; --index >= 0; ) {
if (!collectionExpression.hasComma(index)) {
malformed = true;
}
}
if (collectionExpression.toActualText().endsWith(" ")) {
endPosition--;
}
addProblem(
expression,