$s<T> function
Convert a Dart Type to a Sort.
This supports the following types:
Implementation
Sort $s<T>() {
if (T == int || T == BigInt) {
return intSort;
} else if (T == Rat) {
return realSort;
} else if (T == double) {
return float64Sort;
} else if (T == String) {
return stringSort;
} else if (T == bool) {
return boolSort;
} else if (<T>[] is List<Enum>) {
final m = _declaredEnums[currentContext];
if (m != null && m.containsKey(T)) {
return m[T]!.$2.sort;
} else {
throw ArgumentError.value(
T,
'T',
'not declared, try using declareEnumValues',
);
}
}
throw ArgumentError.value(T, 'T', 'cant be converted to Sort');
}