blob: 555684a7d8be5746a67da2d05276e9c77aa82035 [file] [log] [blame]
String literal(Object? o) {
if (o == null || o is num || o is bool) return '<$o>';
// TODO Truncate long strings?
if (o is String) return "'$o'";
// TODO Truncate long collections?
return '$o';
}
Iterable<String> indent(Iterable<String> lines) => lines.map((l) => ' $l');