writeCodeUnitOutput method
Encodes codeUnit as an annotated BytesOutput.
toString() on the result is a section-labelled hexdump, which is how a
format problem actually gets diagnosed. The bytes are identical to
writeCodeUnit.
Implementation
BytesOutput writeCodeUnitOutput(CodeUnit codeUnit) {
var bytes = writeCodeUnit(codeUnit);
return BytesOutput(data: bytes, description: 'Binary AST: ${codeUnit.id}');
}