buildCascade function
Implementation
ValueNode buildCascade(ValueNode value, List parts) {
if (parts.isNotEmpty) {
final result = CascadeNode();
result.messages.add(value as MessageNode);
for (final part in parts) {
final message = buildMessage(result.receiver, [part[1]]);
result.messages.add(message as MessageNode);
result.semicolons.add(part[0]);
}
return result;
}
return value;
}