mirror of
https://github.com/golang/go
synced 2024-11-24 21:00:09 -07:00
gc: better printing of named constants, func literals
R=ken2 CC=golang-dev https://golang.org/cl/2121045
This commit is contained in:
parent
889377c572
commit
5baaa490d6
@ -119,6 +119,10 @@ exprfmt(Fmt *f, Node *n, int prec)
|
||||
break;
|
||||
|
||||
case OLITERAL:
|
||||
if(n->sym != S) {
|
||||
fmtprint(f, "%S", n->sym);
|
||||
break;
|
||||
}
|
||||
switch(n->val.ctype) {
|
||||
default:
|
||||
goto bad;
|
||||
@ -259,6 +263,10 @@ exprfmt(Fmt *f, Node *n, int prec)
|
||||
exprfmt(f, n->left, 0);
|
||||
break;
|
||||
|
||||
case OCLOSURE:
|
||||
fmtprint(f, "func literal");
|
||||
break;
|
||||
|
||||
case OCOMPLIT:
|
||||
fmtprint(f, "composite literal");
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user