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
@@ -211,12 +211,12 @@ func (n *TypeExpr) appendStr(buf []byte, tm *t.Map, depth uint32) []byte {
case t.KeyPtr:
buf = append(buf, "ptr "...)
return n.Inner().appendStr(buf, tm, depth)
case t.KeyOpenBracket:
case t.KeyArray:
buf = append(buf, '[')
buf = n.ArrayLength().appendStr(buf, tm, false, 0)
buf = append(buf, "] "...)
return n.Inner().appendStr(buf, tm, depth)
case t.KeyColon:
case t.KeySlice:
buf = append(buf, "[] "...)
return n.Inner().appendStr(buf, tm, depth)
case t.KeyOpenParen: