Add token_writer.write_fast_token

This commit is contained in:
Nigel Tao committed 2020-02-12 21:45:06 +11:00
1 parent 36857984c7
commit e9aba8924a
6 files changed
+74 -44

No files matched your search

+7 -1
View File
@@ -20,7 +20,13 @@ pub struct decoder?(
pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
var length : base.u64[..= 0xFFFF]
while args.dst.available() <= 0,
post args.dst.available() > 0,
{
yield? base."$short write"
}
length = 456
args.dst.write_token?(value: 123, length: length)
args.dst.write_fast_token!(value: 123, length: length)
return ok
}