mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Introduce "array[N] T" and "slice T" type syntax
This commit is contained in:
1 parent
2b91e7861c
commit
d33db6dae0
15 files changed
+83
-68
No files matched your search
+2
-2
@@ -212,12 +212,12 @@ func (n *TypeExpr) appendStr(buf []byte, tm *t.Map, depth uint32) []byte {
|
||||
buf = append(buf, "ptr "...)
|
||||
return n.Inner().appendStr(buf, tm, depth)
|
||||
case t.KeyArray:
|
||||
buf = append(buf, '[')
|
||||
buf = append(buf, "array["...)
|
||||
buf = n.ArrayLength().appendStr(buf, tm, false, 0)
|
||||
buf = append(buf, "] "...)
|
||||
return n.Inner().appendStr(buf, tm, depth)
|
||||
case t.KeySlice:
|
||||
buf = append(buf, "[] "...)
|
||||
buf = append(buf, "slice "...)
|
||||
return n.Inner().appendStr(buf, tm, depth)
|
||||
case t.KeyOpenParen:
|
||||
buf = append(buf, "func "...)
|
||||
|
||||
Reference in new issue
Block a user