Prepare array and slice tokens

This commit is contained in:
Nigel Tao committed 2018-04-05 21:51:38 +10:00
1 parent 97aab37462
commit 2b91e7861c
12 files changed
+81 -68

No files matched your search

+2 -2
View File
@@ -312,7 +312,7 @@ func (g *gen) writeResumeSuspend1(b *buffer, n *a.Var, suspend bool, initBoolTyp
rhs = cTypeNames[key]
}
}
case t.KeyColon:
case t.KeySlice:
// TODO: don't assume that the slice is a slice of u8.
rhs = "wuffs_base__slice_u8"
}
@@ -362,7 +362,7 @@ func (g *gen) writeResumeSuspend1(b *buffer, n *a.Var, suspend bool, initBoolTyp
case 0:
b.printf("%s = %s;\n", lhs, rhs)
return nil
case t.KeyOpenBracket:
case t.KeyArray:
inner := typ.Inner()
if inner.Decorator() != 0 {
break