toTerse method
override
Returns the terse representation of this sequence.
This is the same as the sequence, but with default parameters removed.
Implementation
@override
EscapeSequence toTerse() {
if (_defaults.isEmpty) {
return this;
}
final params = parameters.toList();
for (var i = params.length - 1; i >= 0; i--) {
if (params[i] == _defaults[i]) {
params.removeAt(i);
} else {
break;
}
}
return EscapeSequence(finalChars, prefix: prefix, parameters: params);
}