Add a "status" type and "try" keyword.

This commit is contained in:
Nigel Tao committed 2017-09-01 16:41:42 +10:00
1 parent 363dcbe714
commit 935cd73686
11 files changed
+94 -24

No files matched your search

+2 -1
View File
@@ -91,7 +91,8 @@ pub struct decoder?(
pub func decoder.decode?(dst writer1, src reader1)() {
// TODO: copy from dst to history, if we aren't finished.
this.decode_blocks?(dst:in.dst, src:in.src)
var z status = try this.decode_blocks?(dst:in.dst, src:in.src)
return z
}
pri func decoder.decode_blocks?(dst writer1, src reader1)() {