// Continue to calculate the position by going up the hierarchy
if (childExpression == expression) {
return calculatePosition(parent, position);
}
position += childExpression.toParsedText().length();
}
// Never reach this
throw new RuntimeException();
}