serialize method
Implementation
@override
Uint8List serialize(PythonExternalScannerState state) {
final delimiterCount = state.delimiters.length.clamp(0, 255);
final output = BytesBuilder(copy: false)
..addByte(state.insideInterpolatedString ? 1 : 0)
..addByte(delimiterCount);
for (var index = 0; index < delimiterCount; index++) {
output.addByte(state.delimiters[index]);
}
for (var index = 1; index < state.indents.length; index++) {
final indent = state.indents[index];
output
..addByte(indent & 0xff)
..addByte((indent >> 8) & 0xff);
}
return output.takeBytes();
}