composeSymbol method
Implementation
void composeSymbol(StringBuffer buffer, Symbol symbol) {
buffer.write('(');
if (symbol.prefix != null) {
buffer.write(symbol.prefix?.names.first);
}
buffer.write(symbol.unit?.names.first);
if (symbol.exponent != 1) {
buffer.write(' ^ ');
buffer.write(symbol.exponent);
}
buffer.write(')');
}