mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Let ast.TypeExpr represent method types
This commit is contained in:
1 parent
2e12a41414
commit
bf00d114e4
4 files changed
+77
-24
No files matched your search
@@ -202,6 +202,11 @@ func (n *TypeExpr) appendStr(buf []byte, tm *t.Map, depth uint32) []byte {
|
||||
case t.KeyColon:
|
||||
buf = append(buf, "[] "...)
|
||||
return n.Inner().appendStr(buf, tm, depth)
|
||||
case t.KeyOpenParen:
|
||||
buf = append(buf, "func "...)
|
||||
buf = n.Receiver().appendStr(buf, tm, depth)
|
||||
buf = append(buf, '.')
|
||||
return append(buf, tm.ByID(n.Name())...)
|
||||
default:
|
||||
buf = append(buf, tm.ByID(n.Decorator())...)
|
||||
buf = append(buf, '.')
|
||||
|
||||
Reference in new issue
Block a user