last = current;
continue;
}
if (current instanceof StringExpression && last instanceof StringExpression) {
// Last and current are both strings - combine them.
StringExpression currentString = (StringExpression) current;
StringExpression lastString = (StringExpression) last;
last = new StringExpression(lastString.getValue() + currentString.getValue());
} else {
out.add(last);
last = current;
}
}