visitStructObjField method
Implementation
@override
Uint8List visitStructObjField(StructObjField field) {
final bytesBuilder = BytesBuilder();
if (field.isSpread) {
bytesBuilder.addByte(1); // bool: has isSpread
// spread another object
} else {
bytesBuilder.addByte(0); // bool: has isSpread
// normal key: value field
bytesBuilder.add(_parseIdentifier(field.key!.id));
}
final valueBytes = compileAST(field.fieldValue, endOfExec: true);
bytesBuilder.add(valueBytes);
return bytesBuilder.toBytes();
}